Skip to content

Commit

Permalink
Survey: update page title
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannaPeanut committed Dec 21, 2023
1 parent 4502cb7 commit a9e86ae
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/survey-public/components/core/layout/SurveyLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BlitzLayout } from "@blitzjs/next"
import { BlitzLayout, useParam } from "@blitzjs/next"
import Head from "next/head"
import { TailwindResponsiveHelper } from "src/core/layouts/TailwindResponsiveHelper/TailwindResponsiveHelper"
import { SurveyMetaTags } from "../SurveyMetaTags"
Expand All @@ -19,6 +19,7 @@ export const SurveyLayout: BlitzLayout<Props> = ({
canonicalUrl,
primaryColor,
}) => {
const surveySlug = useParam("surveySlug", "string")
const extension = new URL(logoUrl).pathname.split(".").at(-1)
const mimetype =
{ ico: "image/x-icon", svg: "image/svg+xml", jpg: "image/jpeg", png: "image/png" }[
Expand All @@ -31,7 +32,10 @@ export const SurveyLayout: BlitzLayout<Props> = ({
<link rel="icon" href={logoUrl} type={mimetype} />
{canonicalUrl && <link rel="canonical" href={canonicalUrl} />}
</Head>
<SurveyMetaTags canonicalUrl={canonicalUrl} title="Beteiligung RS8" />
<SurveyMetaTags
canonicalUrl={canonicalUrl}
title={`Beteiligung ${surveySlug?.toUpperCase()}`}
/>

<div className="relative flex h-full flex-col overflow-x-hidden">
<SurveyHeader primaryColor={primaryColor} landingPageUrl={canonicalUrl} logoSrc={logoUrl} />
Expand Down

0 comments on commit a9e86ae

Please sign in to comment.