From fcfad094da319072c3510b02d855f98e44eb7542 Mon Sep 17 00:00:00 2001 From: aeschi Date: Mon, 12 Feb 2024 12:23:04 +0100 Subject: [PATCH] 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 --- src/App.tsx | 77 ++----------------------- src/components/feedback/index.tsx | 25 ++++++++ src/components/footer/index.tsx | 68 ++++++++++++++++++++++ src/i18n/translations/translations.json | 26 ++++++++- 4 files changed, 121 insertions(+), 75 deletions(-) create mode 100644 src/components/feedback/index.tsx create mode 100644 src/components/footer/index.tsx diff --git a/src/App.tsx b/src/App.tsx index 7a89dce..18134bc 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -4,12 +4,11 @@ import { Progress } from "./components/progress"; import { HomeButton } from "./components/buttons/home-button"; import { HeaderTitle } from "./components/header-title"; import { useProgressStore } from "./components/steps/store"; -import { useI18nStore } from "../src/i18n/store"; -import { availableLanguages } from "../src/i18n/store/types.ts"; +import { Feedback } from "./components/feedback/index.tsx"; +import { Footer } from "./components/footer/index.tsx"; function App() { const currentStep = useProgressStore((state) => state.currentStep); - const language = useI18nStore((state) => state.language); return ( <> @@ -34,19 +33,7 @@ function App() { - {language === availableLanguages[0] && ( -
- Wie gefällt Dir die Anwendung? - - Beantworte uns gerne einige Fragen. - -
- )} +
@@ -58,63 +45,7 @@ function App() { } `} >
- +