diff --git a/app/_component/sections/notice/Announce.tsx b/app/_component/sections/notice/Announce.tsx index e49c0ba..cf0b534 100644 --- a/app/_component/sections/notice/Announce.tsx +++ b/app/_component/sections/notice/Announce.tsx @@ -1,40 +1,53 @@ +import ImageSection from '../Image'; import NoticeCard from './Card'; import { getNotices } from '@/components/loadFiles'; import { css } from '@/styled-system/css'; -export default function Notice() { +interface Props { + img: string; +} + +export default function Notice({ img }: Props) { const notices = getNotices(); // ビルド時点での期限が過ぎたお知らせは表示しないï const displayNotices = notices.filter( (n) => n.deadline.getTime() > Date.now(), ); + if (displayNotices.length === 0) { + return null; + } + return ( -
-

+
- お知らせ -

+

+ お知らせ +

-
- {displayNotices.map((notice) => ( - - ))} -
-
+
+ {displayNotices.map((notice) => ( + + ))} +
+ + + + ); } diff --git a/app/page.tsx b/app/page.tsx index 86ab464..f9af8a7 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -20,8 +20,7 @@ export default function Home() { return (
- - + {mdContents.splice(1).map((content, index) => { return (