From 0f8af09cdc90dd9795e1da340f44f817e27f881f Mon Sep 17 00:00:00 2001 From: Sidonie Bouthors <92856411+SidonieBouthors@users.noreply.github.com> Date: Wed, 18 Sep 2024 14:38:58 +0200 Subject: [PATCH] feat: save the date translation button (#70) --- app/src/pages/save-the-date.tsx | 36 +++++++++++++++++++-------------- directus | 2 +- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/app/src/pages/save-the-date.tsx b/app/src/pages/save-the-date.tsx index 7d036b4..59ed6eb 100644 --- a/app/src/pages/save-the-date.tsx +++ b/app/src/pages/save-the-date.tsx @@ -120,6 +120,7 @@ function TranslatedSection( const clic_cells = cells.filter((cell) => cell.commission == null); const translated_std = getTranslation(save_the_date, language_code); const tt = useTranslationTable(); + const router = useRouter(); return ( <> @@ -147,21 +148,25 @@ function TranslatedSection( - - -
- - {tt["translated-version"]} - -
- - + {router.locale === save_the_date.language_button_target ? ( + <> + ) : ( + + +
+ + {tt["translated-version"]} + +
+ + + )} @@ -342,6 +347,7 @@ export const getServerSideProps: GetServerSideProps<{ "title_color", "button_color", { translations: ["*"] }, + "language_button_target", ], }) ), diff --git a/directus b/directus index 7b2d24b..2c26588 160000 --- a/directus +++ b/directus @@ -1 +1 @@ -Subproject commit 7b2d24b726f8860142914a85fca9276bc07ce5d7 +Subproject commit 2c26588d91432cd599cf1c06c8f333dc3e0f0895