Skip to content

Commit

Permalink
fix ridaisai
Browse files Browse the repository at this point in the history
  • Loading branch information
qq8244353 committed Nov 30, 2023
1 parent 47c6060 commit 72f5c53
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 77 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
143 changes: 67 additions & 76 deletions pages/index.tsx
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),
},
},
}
}
1 change: 0 additions & 1 deletion src/pages/Home/HeroView/Banner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export default function TopBanner() {
<Banner>
<Image></Image>
<Names></Names>
<Center>理大祭まであと1日!(特設サイトに切り替わりますのでお楽しみに!)</Center>
</Banner>
)
}
Expand Down

0 comments on commit 72f5c53

Please sign in to comment.