diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..bffb357 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/pages/index.tsx b/pages/index.tsx index fb79642..67f6518 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,80 +1,71 @@ -// import { getArticlesAll, getPageMarkdown } from 'api/markdowns' -// import { GetStaticProps } from 'next' -// import Home from 'src/pages/Home' -// import { EventCalendar } from 'src/pages/Home/ScheduleView' -// import { AboutMeta } from './about' -// import { ContactMeta } from './contact' -// import { createfilterdArticleMetaList } from './news' -// import { ScheduleMeta } from './schedule' -// -// interface Props { -// aboutData: { -// meta: AboutMeta -// } -// scheduleData: { -// meta: ScheduleMeta -// } -// newsData: { -// articlesStr: string -// } -// contactData: { -// meta: ContactMeta -// } -// } -// -// export default function IndexPage({ -// aboutData: _aboutData, -// scheduleData: _scheduleData, -// newsData: _newsData, -// contactData: _contactData, -// }: Props) { -// const { caption } = _aboutData.meta -// -// const eventCalendar = new EventCalendar(_scheduleData.meta.startMonth, _scheduleData.meta.eventCalendar, true) -// -// const articles = JSON.parse(_newsData.articlesStr) -// -// const { clubroom, twitterId, mail } = _contactData.meta -// -// return ( -// -// ) -// } -// -// export const getStaticProps: GetStaticProps = async () => { -// const { meta: aboutMeta } = getPageMarkdown('about') -// const { meta: scheduleMeta } = getPageMarkdown('schedule') -// const { meta: contactMeta } = getPageMarkdown('contact') -// const articles = getArticlesAll() -// -// return { -// props: { -// aboutData: { -// meta: aboutMeta, -// }, -// scheduleData: { -// meta: scheduleMeta, -// }, -// contactData: { -// meta: contactMeta, -// }, -// newsData: { -// articlesStr: JSON.stringify(articles), -// }, -// }, -// } -// } -import Ridaisai2023 from 'src/pages/Ridaisai2023' +import { getArticlesAll, getPageMarkdown } from 'api/markdowns' +import { GetStaticProps } from 'next' +import Home from 'src/pages/Home' +import { EventCalendar } from 'src/pages/Home/ScheduleView' +import { AboutMeta } from './about' +import { ContactMeta } from './contact' +import { createfilterdArticleMetaList } from './news' +import { ScheduleMeta } from './schedule' + +interface Props { + aboutData: { + meta: AboutMeta + } + scheduleData: { + meta: ScheduleMeta + } + newsData: { + articlesStr: string + } + contactData: { + meta: ContactMeta + } +} + +export default function IndexPage({ + aboutData: _aboutData, + scheduleData: _scheduleData, + newsData: _newsData, + contactData: _contactData, +}: Props) { + const { caption } = _aboutData.meta + + const eventCalendar = new EventCalendar(_scheduleData.meta.startMonth, _scheduleData.meta.eventCalendar, true) + + const articles = JSON.parse(_newsData.articlesStr) + + const { clubroom, twitterId, mail } = _contactData.meta -export default function IndexPage() { return ( - <> - - + ) } + +export const getStaticProps: GetStaticProps = async () => { + const { meta: aboutMeta } = getPageMarkdown('about') + const { meta: scheduleMeta } = getPageMarkdown('schedule') + const { meta: contactMeta } = getPageMarkdown('contact') + const articles = getArticlesAll() + + return { + props: { + aboutData: { + meta: aboutMeta, + }, + scheduleData: { + meta: scheduleMeta, + }, + contactData: { + meta: contactMeta, + }, + newsData: { + articlesStr: JSON.stringify(articles), + }, + }, + } +} diff --git a/src/pages/Home/HeroView/Banner/index.tsx b/src/pages/Home/HeroView/Banner/index.tsx index a673de3..f6e7e54 100644 --- a/src/pages/Home/HeroView/Banner/index.tsx +++ b/src/pages/Home/HeroView/Banner/index.tsx @@ -15,7 +15,6 @@ export default function TopBanner() { -
理大祭まであと1日!(特設サイトに切り替わりますのでお楽しみに!)
) }