Skip to content

Commit

Permalink
feat: save the date translation button (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
SidonieBouthors authored Sep 18, 2024
1 parent 91a099a commit 0f8af09
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
36 changes: 21 additions & 15 deletions app/src/pages/save-the-date.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<>
Expand Down Expand Up @@ -147,21 +148,25 @@ function TranslatedSection(
</td>
</tr>

<tr>
<td style={{ padding: "1rem 0 1rem 0" }}>
<center>
<a
href="https://clic.epfl.ch/en-US/save-the-date/"
style={{
background: save_the_date.button_color || undefined,
...BUTTON_STYLE,
}}
>
{tt["translated-version"]}
</a>
</center>
</td>
</tr>
{router.locale === save_the_date.language_button_target ? (
<></>
) : (
<tr>
<td style={{ padding: "1rem 0 1rem 0" }}>
<center>
<a
href={`https://clic.epfl.ch/${save_the_date.language_button_target}/save-the-date/`}
style={{
background: save_the_date.button_color || undefined,
...BUTTON_STYLE,
}}
>
{tt["translated-version"]}
</a>
</center>
</td>
</tr>
)}

<tr>
<td>
Expand Down Expand Up @@ -342,6 +347,7 @@ export const getServerSideProps: GetServerSideProps<{
"title_color",
"button_color",
{ translations: ["*"] },
"language_button_target",
],
})
),
Expand Down
2 changes: 1 addition & 1 deletion directus
Submodule directus updated 6 files
+3 −3 README.md
+3 −1 populate.sh
+3 −1 save-data.sh
+3 −2 save.sh
+90 −28 snapshot.yaml
+219 −178 types/schema.d.ts

0 comments on commit 0f8af09

Please sign in to comment.