generated from technologiestiftung/template-repo-citylab
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: refactor feedback and footer to components
- removed footer and feedback from App.tsx to individual components - added all text sections to translation.json for clean structure
- Loading branch information
Showing
4 changed files
with
121 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { t } from "../../i18n/translations"; | ||
import { useI18nStore } from "../../i18n/store"; | ||
import { availableLanguages } from "../../../src/i18n/store/types"; | ||
|
||
export function Feedback() { | ||
const language = useI18nStore((state) => state.language); | ||
|
||
return ( | ||
<> | ||
{language === availableLanguages[0] && ( | ||
<div className="flex w-full flex-wrap justify-center gap-x-2 px-8 py-4 text-sm"> | ||
{t("feedback.question", language)} | ||
<a | ||
className="text-blue-500 underline" | ||
href={t("feedback.link", language)} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
{t("feedback.link.label", language)} | ||
</a> | ||
</div> | ||
)} | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { t } from "../../i18n/translations"; | ||
import { useI18nStore } from "../../i18n/store"; | ||
import { useProgressStore } from "../steps/store"; | ||
|
||
export function Footer() { | ||
const language = useI18nStore((state) => state.language); | ||
const currentStep = useProgressStore((state) => state.currentStep); | ||
|
||
return ( | ||
<footer | ||
className={`flex py-4 | ||
${currentStep === 0 || currentStep === 16 ? "flex" : "hidden md:flex"} | ||
`} | ||
id="footer" | ||
> | ||
<div className="flex w-full flex-wrap justify-start gap-y-5"> | ||
<div className="flex w-full flex-wrap justify-start gap-x-10 gap-y-5 px-8 py-2 text-sm sm:justify-center md:gap-x-20 md:px-5"> | ||
<div className="flex flex-col gap-4"> | ||
{t("logo.t1", language)} | ||
<img | ||
src="/images/logo-citylab-berlin-outline.svg" | ||
alt="Logo von CityLab Berlin" | ||
className="w-32" | ||
loading="lazy" | ||
/> | ||
</div> | ||
<div className="flex flex-col gap-4"> | ||
{t("logo.t2", language)} | ||
<img | ||
src="/images/logo-technologiestiftung-berlin-de.svg" | ||
alt="Logo von Technologiestiftung Berlin" | ||
className="w-32" | ||
loading="lazy" | ||
/> | ||
</div> | ||
<div className="flex flex-col gap-4"> | ||
{t("logo.t3", language)} | ||
<img | ||
src="/images/logo-senatskanzlei-buergermeister-vertikal.svg" | ||
alt="Logo von Berlins Regierender Bürgermeister" | ||
className="w-28" | ||
loading="lazy" | ||
/> | ||
</div> | ||
</div> | ||
|
||
<div className="flex w-full flex-wrap justify-center gap-x-5 px-5 text-sm "> | ||
<a | ||
className="flex flex-col gap-4 text-gray-400 underline" | ||
href="https://www.technologiestiftung-berlin.de/datenschutz" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
{t("dataProtection", language)} | ||
</a> | ||
<a | ||
className="flex flex-col gap-4 text-gray-400 underline" | ||
href="https://www.technologiestiftung-berlin.de/impressum" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
{t("imprint", language)} | ||
</a> | ||
</div> | ||
</div> | ||
</footer> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters