Skip to content

Commit

Permalink
🌐 add La Réunion agency (#294)
Browse files Browse the repository at this point in the history
* 🌐 add La Réunion agency

* 🌐 remove translations of agencies
  • Loading branch information
bengeois authored Oct 25, 2022
1 parent ab7312c commit 04d32be
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 42 deletions.
16 changes: 0 additions & 16 deletions i18n/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,6 @@ export default {
loading: {
loadingText: "Loading...",
},
agencies: {
Paris: "Paris",
Nantes: "Nantes",
Singapore: "Singapore",
Bordeaux: "Bordeaux",
Brest: "Brest",
Montreal: "Montreal",
Grenoble: "Grenoble",
Lyon: "Lyon",
Rennes: "Rennes",
Lille: "Lille",
Niort: "Niort",
"Clermont-Ferrand": "Clermont-Ferrand",
Toronto: "Toronto",
Casablanca: "Casablanca",
},
createProfile: {
title: "Let's create a profile !",
profileCreated: "Congratulations your profile is now created !",
Expand Down
16 changes: 0 additions & 16 deletions i18n/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,6 @@ export default {
loading: {
loadingText: "Chargement...",
},
agencies: {
Paris: "Paris",
Nantes: "Nantes",
Singapore: "Singapour",
Bordeaux: "Bordeaux",
Brest: "Brest",
Montreal: "Montreal",
Grenoble: "Grenoble",
Lyon: "Lyon",
Rennes: "Rennes",
Lille: "Lille",
Niort: "Niort",
"Clermont-Ferrand": "Clermont-Ferrand",
Toronto: "Toronto",
Casablanca: "Casablanca",
},
createProfile: {
title: "Créez votre profil !",
profileCreated: "Bravo, votre profil a été créé !",
Expand Down
4 changes: 1 addition & 3 deletions src/components/TopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,7 @@ const TopBar = ({ togglePanel }: TopBarProps) => {
<span className="font-bold">{user?.name}</span>
{userAgencyResult?.UserLatestAgency[0]?.agency && (
<span>
{`Zenika ${t(
`agencies.${userAgencyResult?.UserLatestAgency[0]?.agency}`
)}`}
{`Zenika ${userAgencyResult?.UserLatestAgency[0]?.agency}`}
</span>
)}
</div>
Expand Down
5 changes: 1 addition & 4 deletions src/components/UserPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import Image from "next/image";
import Link from "next/link";
import { useContext } from "react";
import { i18nContext } from "../utils/i18nContext";

type User = { name: string; picture: string; agency: string; email: string };
const UserPanel = ({ user, context }: { user: User; context: string }) => {
const { t } = useContext(i18nContext);
const { name, picture, agency } = user;

return (
Expand All @@ -28,7 +25,7 @@ const UserPanel = ({ user, context }: { user: User; context: string }) => {
<div className="flex flex-row">
<h2 className="text-xl">{name}</h2>
</div>
<h3 className="text-md">Zenika {t(`agencies.${agency}`)}</h3>
<h3 className="text-md">{`Zenika ${agency}`}</h3>
</div>
</div>
</div>
Expand Down
4 changes: 1 addition & 3 deletions src/components/UserSkillPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ const UserSkillPanel = ({
<></>
)}
</div>
<h3 className="text-md">
Zenika {t(`agencies.${skill.user.agency}`)}
</h3>
<h3 className="text-md">{`Zenika ${skill.user.agency}`}</h3>
</div>
</div>
<div className="flex flex-row justify-around">
Expand Down

0 comments on commit 04d32be

Please sign in to comment.