-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
70 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ( | ||
// <Home | ||
// aboutData={{ caption }} | ||
// scheduleData={{ eventCalendar }} | ||
// newsData={{ metaList: createfilterdArticleMetaList(articles) }} | ||
// contactData={{ clubroom, twitterId, mail }} | ||
// /> | ||
// ) | ||
// } | ||
// | ||
// export const getStaticProps: GetStaticProps<Props> = async () => { | ||
// const { meta: aboutMeta } = getPageMarkdown<AboutMeta>('about') | ||
// const { meta: scheduleMeta } = getPageMarkdown<ScheduleMeta>('schedule') | ||
// const { meta: contactMeta } = getPageMarkdown<ContactMeta>('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 ( | ||
<> | ||
<Ridaisai2023 /> | ||
</> | ||
<Home | ||
aboutData={{ caption }} | ||
scheduleData={{ eventCalendar }} | ||
newsData={{ metaList: createfilterdArticleMetaList(articles) }} | ||
contactData={{ clubroom, twitterId, mail }} | ||
/> | ||
) | ||
} | ||
|
||
export const getStaticProps: GetStaticProps<Props> = async () => { | ||
const { meta: aboutMeta } = getPageMarkdown<AboutMeta>('about') | ||
const { meta: scheduleMeta } = getPageMarkdown<ScheduleMeta>('schedule') | ||
const { meta: contactMeta } = getPageMarkdown<ContactMeta>('contact') | ||
const articles = getArticlesAll() | ||
|
||
return { | ||
props: { | ||
aboutData: { | ||
meta: aboutMeta, | ||
}, | ||
scheduleData: { | ||
meta: scheduleMeta, | ||
}, | ||
contactData: { | ||
meta: contactMeta, | ||
}, | ||
newsData: { | ||
articlesStr: JSON.stringify(articles), | ||
}, | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters