diff --git a/src/app/components/BoardPanelClient.tsx b/src/app/components/BoardPanelClient.tsx index d9cb16d..f338646 100644 --- a/src/app/components/BoardPanelClient.tsx +++ b/src/app/components/BoardPanelClient.tsx @@ -56,6 +56,13 @@ export function BoardPanelClient({ const selectedBoardData = boardsData.find(bd => bd.board.id === selectedBoardId) || boardsData[0]; const { board, categoryName, siblingBoards } = selectedBoardData; + const isNewWithin1Hour = (createdAt: Date | string | number | null | undefined): boolean => { + if (!createdAt) return false; + const t = new Date(createdAt).getTime(); + if (Number.isNaN(t)) return false; + return (Date.now() - t) <= 60 * 60 * 1000; + }; + function formatDateYmd(d: Date) { const date = new Date(d); const yyyy = date.getFullYear(); @@ -103,7 +110,7 @@ export function BoardPanelClient({ key={sb.id} onClick={() => setSelectedBoardId(sb.id)} className={`px-[16px] py-[8px] rounded-[14px] text-[14px] shrink-0 cursor-pointer ${ - sb.id === selectedBoardId ? "bg-[#5c5c5c] text-white border border-[#5c5c5c]" : "bg-white text-[#5c5c5c] border border-[#d5d5d5]" + sb.id === selectedBoardId ? "bg-[#5c5c5c] text-white border border-[#5c5c5c]" : "bg-white text-[#5c5c5c] border border-[#d5d5d5] hover:bg-[#5c5c5c] hover:text-white hover:border-[#5c5c5c] transition-colors" }`} > {sb.name} @@ -178,8 +185,8 @@ export function BoardPanelClient({