From 475739ba3e35ac944363815de5ae9314b4b536ff Mon Sep 17 00:00:00 2001 From: Robin <16273164+robines@users.noreply.github.com> Date: Sat, 2 Nov 2024 01:43:17 +0100 Subject: [PATCH] Update contributors page (#1584) --- .../Contributor.tsx => ContributorItem.tsx} | 13 +----------- .../ContributorsPage/ContributorsPage.tsx | 21 +++++-------------- .../components/Contributor/index.ts | 1 - .../ContributorsPage/components/index.ts | 1 - frontend/src/Pages/ContributorsPage/types.ts | 11 ++++++++++ 5 files changed, 17 insertions(+), 30 deletions(-) rename frontend/src/Pages/ContributorsPage/{components/Contributor/Contributor.tsx => ContributorItem.tsx} (90%) delete mode 100644 frontend/src/Pages/ContributorsPage/components/Contributor/index.ts delete mode 100644 frontend/src/Pages/ContributorsPage/components/index.ts create mode 100644 frontend/src/Pages/ContributorsPage/types.ts diff --git a/frontend/src/Pages/ContributorsPage/components/Contributor/Contributor.tsx b/frontend/src/Pages/ContributorsPage/ContributorItem.tsx similarity index 90% rename from frontend/src/Pages/ContributorsPage/components/Contributor/Contributor.tsx rename to frontend/src/Pages/ContributorsPage/ContributorItem.tsx index 78dde9035..7348c371e 100644 --- a/frontend/src/Pages/ContributorsPage/components/Contributor/Contributor.tsx +++ b/frontend/src/Pages/ContributorsPage/ContributorItem.tsx @@ -7,18 +7,7 @@ import darkAvatar from '~/assets/contributors/default_dark.svg'; import { THEME } from '~/constants'; import { useGlobalContext } from '~/context/GlobalContextProvider'; import { KEY } from '~/i18n/constants'; - -export type Contributor = { - name: string; - from: string; - to?: string; - github?: string; - picture?: string; - websjef?: { - from: string; - to: string; - }; -}; +import type { Contributor } from './types'; type Props = { contributor: Contributor; diff --git a/frontend/src/Pages/ContributorsPage/ContributorsPage.tsx b/frontend/src/Pages/ContributorsPage/ContributorsPage.tsx index 2d090cc5f..df8645322 100644 --- a/frontend/src/Pages/ContributorsPage/ContributorsPage.tsx +++ b/frontend/src/Pages/ContributorsPage/ContributorsPage.tsx @@ -6,19 +6,14 @@ import robines from '~/assets/contributors/robines.jpg'; import snorre98 from '~/assets/contributors/snorre98.jpg'; import sygard from '~/assets/contributors/sygard.jpg'; import { KEY } from '~/i18n/constants'; +import { ContributorItem } from './ContributorItem'; import styles from './ContributorsPage.module.scss'; -import { type Contributor, ContributorItem } from './components'; +import type { Contributor } from './types'; // biome-ignore format: array should not be formatted const CONTRIBUTORS: Contributor[] = [ // H17 - { - name: 'Kevin Kristiansen', - github: 'KevinKristiansen', - from: 'H17', - to: 'V20', - websjef: { from: 'V18', to: 'H18' }, - }, + { name: 'Kevin Kristiansen', github: 'KevinKristiansen', from: 'H17', to: 'V20', websjef: { from: 'V18', to: 'H18' } }, // H19 { name: 'Emil Telstad', github: 'emilte', from: 'H19' }, { name: 'Sigve Røkenes', github: 'evgiz', from: 'H19', to: 'H23', websjef: { from: 'H20', to: 'V21' } }, @@ -39,15 +34,9 @@ const CONTRIBUTORS: Contributor[] = [ { name: 'Eirik Hoem', github: 'eiriksho', from: 'H22', to: 'V23' }, { name: 'Simen Seeberg-Rommetveit', github: 'simensee', from: 'H22' }, // V23 - { - name: 'Robin Espinosa Jelle', - github: 'robines', - from: 'V23', - picture: robines, - websjef: { from: 'H23', to: 'V24' }, - }, + { name: 'Robin Espinosa Jelle', github: 'robines', from: 'V23', picture: robines, websjef: { from: 'H23', to: 'V24' } }, { name: 'Johanne Grønlien Gjedrem', github: 'johannegg', from: 'V23' }, - { name: 'Tinius Presterud', github: 'tiniuspre', from: 'V23' }, + { name: 'Tinius Presterud', github: 'tiniuspre', from: 'V23', to: 'V24' }, // H23 { name: 'Amalie Johansen Vik', github: 'amaliejvik', from: 'H23', picture: amaliejvik }, { name: 'Marion Lystad', github: 'marionlys', from: 'H23' }, diff --git a/frontend/src/Pages/ContributorsPage/components/Contributor/index.ts b/frontend/src/Pages/ContributorsPage/components/Contributor/index.ts deleted file mode 100644 index 688926668..000000000 --- a/frontend/src/Pages/ContributorsPage/components/Contributor/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type Contributor, ContributorItem } from './Contributor'; diff --git a/frontend/src/Pages/ContributorsPage/components/index.ts b/frontend/src/Pages/ContributorsPage/components/index.ts deleted file mode 100644 index 688926668..000000000 --- a/frontend/src/Pages/ContributorsPage/components/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type Contributor, ContributorItem } from './Contributor'; diff --git a/frontend/src/Pages/ContributorsPage/types.ts b/frontend/src/Pages/ContributorsPage/types.ts new file mode 100644 index 000000000..69350b0f6 --- /dev/null +++ b/frontend/src/Pages/ContributorsPage/types.ts @@ -0,0 +1,11 @@ +export type Contributor = { + name: string; + from: string; + to?: string; + github?: string; + picture?: string; + websjef?: { + from: string; + to: string; + }; +};