Skip to content

Commit cd48c4f

Browse files
committed
페이지 타이틀 enum이 없을 경우 타이틀에 props 그대로 보여주도록 변경
1 parent 7e22929 commit cd48c4f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

frontend/components/core/PageTitle.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ interface PageTitleProps {
1212
}
1313

1414
const PageTitle = (props: PageTitleProps) => {
15-
const { t } = useTranslation()
15+
const { t, i18n } = useTranslation()
16+
const title = i18n.exists(`pageTitle:${props.title}`)
17+
? t(`pageTitle:${props.title}`)
18+
: props.title
1619

17-
return <Title>{t(`pageTitle:${props.title}`)}</Title>
20+
return <Title>{title}</Title>
1821
}
1922

2023
export default PageTitle

0 commit comments

Comments
 (0)