File tree Expand file tree Collapse file tree 9 files changed +52
-4
lines changed
Expand file tree Collapse file tree 9 files changed +52
-4
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export enum PageName {
1212 CfpGuide = 'CfpGuide' ,
1313 Sponsor = 'Sponsor' ,
1414 SponsorList = 'SponsorList' ,
15+ SponsorPatrons = 'SponsorPatrons' ,
1516 SponsorProspectus = 'SponsorProspectus' ,
1617 SponsorJoin = 'SponsorJoin' ,
1718 SponsorBenefit = 'SponsorBenefit' ,
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ export interface ContentPage extends PageProps {
1313}
1414
1515export interface LocalePage < T > extends PageProps {
16+ title ?: string
1617 ko : T
1718 en : T
1819}
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ export default {
1414 [ PageName . CfpGuide ] : 'How to Submit a Proposal' ,
1515 [ PageName . Sponsor ] : 'Sponsor' ,
1616 [ PageName . SponsorList ] : 'Sponsors' ,
17+ [ PageName . SponsorPatrons ] : 'Patrons' ,
1718 [ PageName . SponsorProspectus ] : 'Prospectus' ,
1819 [ PageName . SponsorJoin ] : 'Join as Sponsor' ,
1920 [ PageName . SponsorBenefit ] : 'Benefit' ,
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ export default {
1414 [ PageName . CfpGuide ] : '발표안 작성 가이드' ,
1515 [ PageName . Sponsor ] : '후원하기' ,
1616 [ PageName . SponsorList ] : '후원사' ,
17+ [ PageName . SponsorPatrons ] : '개인 후원자' ,
1718 [ PageName . SponsorProspectus ] : '후원사 안내' ,
1819 [ PageName . SponsorJoin ] : '후원사로 참여하기' ,
1920 [ PageName . SponsorBenefit ] : '후원사 혜택 설명' ,
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { ThemeProvider } from 'styled-components'
77import '../assets/styles/global.css'
88import Theme from '../assets/styles/theme'
99import { NextSeo } from 'next-seo'
10+ import Head from 'next/head'
1011
1112const App = ( {
1213 Component,
@@ -19,14 +20,20 @@ const App = ({
1920 const { pathname } = router
2021
2122 const pageName = pageProps ?. title ?? ''
22- const pageTitle =
23- pageName !== ''
24- ? `${ t ( `pageTitle:${ pageName } ` ) } : ${ t ( `label:siteTitle` ) } `
25- : `${ t ( `label:siteTitle` ) } `
2623 const description = `${ t ( `label:pyconkrTitle` ) } : ${ t ( `label:pyconkrDate` ) } `
2724
2825 const hideSponsor = pathname === '/sponsor'
2926
27+ const getPageTitle = ( ) : string => {
28+ if ( i18n . exists ( `pageTitle:${ pageName } ` ) ) {
29+ return `${ t ( `pageTitle:${ pageName } ` ) } : ${ t ( `label:siteTitle` ) } `
30+ } else if ( pageProps ?. title ) {
31+ return `${ pageProps ?. title } : ${ t ( `label:siteTitle` ) } `
32+ }
33+ return `${ t ( `label:siteTitle` ) } `
34+ }
35+ const pageTitle = getPageTitle ( )
36+
3037 return (
3138 < >
3239 < I18nextProvider i18n = { i18n } >
@@ -47,6 +54,9 @@ const App = ({
4754 ]
4855 } }
4956 />
57+ < Head >
58+ < title > { pageTitle } </ title >
59+ </ Head >
5060 < Layout
5161 locale = { locale }
5262 pageName = { pageName }
Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ export const getServerSideProps: GetServerSideProps = async (
8080 return {
8181 props : {
8282 locale,
83+ title : data . title ,
8384 ko : data ,
8485 en : data
8586 }
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { useTranslation } from 'react-i18next'
1010import { media } from '../../../assets/styles/mixin'
1111
1212interface SponsorDetailProps extends LocalePage < ISponsorDetail > {
13+ title : string
1314 locale : string
1415}
1516
@@ -70,6 +71,7 @@ export const getServerSideProps: GetServerSideProps = async (
7071 return {
7172 props : {
7273 locale,
74+ title : data . name ,
7375 ko : data ,
7476 en : data
7577 }
Original file line number Diff line number Diff line change 1+ import React from 'react'
2+ import type { NextPage , GetServerSideProps } from 'next'
3+ import { useTranslation } from 'react-i18next'
4+ import { PageName } from '../../data/enums/PageName'
5+ import PageTitle from '../../components/core/PageTitle'
6+ import { PageProps } from '../../interfaces/PageProps'
7+
8+ const Patrons : NextPage = ( props : PageProps ) => {
9+ const { t } = useTranslation ( )
10+
11+ return (
12+ < div >
13+ < PageTitle title = { props . pageName } />
14+ { t ( 'label:preparing' ) }
15+ </ div >
16+ )
17+ }
18+
19+ export const getServerSideProps : GetServerSideProps = async ( ) => {
20+ return {
21+ props : {
22+ title : PageName . SponsorPatrons
23+ }
24+ }
25+ }
26+
27+ export default Patrons
Original file line number Diff line number Diff line change @@ -61,6 +61,10 @@ export const routes: RouteType[] = [
6161 path : '/sponsor/list' ,
6262 name : PageName . SponsorList
6363 } ,
64+ {
65+ path : '/sponsor/patron' ,
66+ name : PageName . SponsorPatrons
67+ } ,
6468 {
6569 path : '/sponsor/prospectus' ,
6670 name : PageName . SponsorProspectus
You can’t perform that action at this time.
0 commit comments