diff --git a/src/components/PageLayout/PageLayout.tsx b/src/components/PageLayout/PageLayout.tsx index 2ced9a35..6e5d23d4 100644 --- a/src/components/PageLayout/PageLayout.tsx +++ b/src/components/PageLayout/PageLayout.tsx @@ -29,13 +29,14 @@ const seminarTitle: Record = { // ked budeme potrebovat top-level stranky ako `/ina-stranka`, budeme musiet upravit, ako sa pracuje s `useSeminarInfo` export const PageLayout: FC = ({contentWidth = 2, title = '', children}) => { const {seminar} = useSeminarInfo() + const browserTitlePrefix = title && `${title} | ` + const browserTitle = `${browserTitlePrefix}${seminarTitle[seminar]}` + return ( <> - - {title && `${title} | `} - {seminarTitle[seminar]} - + {/* mali sme tu pred zmenou warning, musi to byt jeden text child: `A title element received an array with more than 1 element as children.` */} + {browserTitle}