Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add head-title to pages #252

Merged
merged 2 commits into from
Dec 9, 2023
Merged

Add head-title to pages #252

merged 2 commits into from
Dec 9, 2023

Conversation

vikibrezinova
Copy link
Contributor

Close #229
Dáva to názov vo formáte "page_title | seminar_name"

@@ -16,31 +18,46 @@ type PageLayoutProps = {
children: ReactNode
}

export type Seminar = 'strom' | 'matik' | 'malynar'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

importovat z useSeminarInfo

<>
<Head>
<title>
{title} | {seminarTitle[seminar]}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

title je v PageLayout optional, mozno na niektorych strankach naozaj nie je, no a nechceli by sme, aby title zacinal ciarou.
tento riadok by som zmenil na... 🤔 prvy nastrel:

{title && `${title} | `}{seminarTitle[seminar]}

druhy nastrel:

{title ? `${title} | ${seminarTitle[seminar]}` : seminarTitle[seminar]}

mozes si vybrat 😄 v druhom pripade by sa dala extrahovat nejaka konstanta pre seminarTitle[seminar], nech je to kratsie.

@vikibrezinova vikibrezinova merged commit 5df8ae8 into master Dec 9, 2023
1 check passed
@vikibrezinova vikibrezinova deleted the title branch December 9, 2023 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pomenovať stránku
2 participants