From a96b3332a7b6a69f05eaaeef424eef65f36ea198 Mon Sep 17 00:00:00 2001 From: Supattra Wongsamal Date: Sun, 20 Oct 2024 14:46:37 +0200 Subject: [PATCH] fix: merge conflict --- messages/en.json | 2 +- messages/no.json | 2 +- src/app/[locale]/(default)/about/page.tsx | 138 ++++++++-------------- 3 files changed, 51 insertions(+), 91 deletions(-) diff --git a/messages/en.json b/messages/en.json index d014820..738fe6c 100644 --- a/messages/en.json +++ b/messages/en.json @@ -61,7 +61,7 @@ "views": "Views" }, "about": { - "whatIsHackerspace": "What is Hackerspace", + "whatIsHackerspace": "What is Hackerspace?", "inforAboutHackerSpace": " Hackerspace NTNU is a student-driven project open to all students, regardless of study direction or Hackerspace membership. We offer a creative arena where students from different disciplines can get help realizing their ideas in an engaged and inclusive environment. Here, you will find new technology at your disposal, including drones, 3D printers, and Virtual Reality equipment. Whether you are a first-year student needing help with your first Arduino project or a fourth-year student wanting to create a 3D model of Trondheim, we can provide both equipment and expertise. We also regularly hold courses for both beginners and advanced students in many exciting subjects. Come by to see what we're doing and have a chat. You can find us on the second floor of the A-block in the Realfagbygget at NTNU Gløshaugen.", "showMaps": "Show map!", "FAQ": "Frequently Asked Questions", diff --git a/messages/no.json b/messages/no.json index fe52baa..ee0a710 100644 --- a/messages/no.json +++ b/messages/no.json @@ -62,7 +62,7 @@ "views": "Visninger" }, "about": { - "whatIsHackerspace": "Hva er Hackerspace", + "whatIsHackerspace": "Hva er Hackerspace?", "inforAboutHackerSpace": " Hackerspace NTNU er et studentdrevet prosjekt åpent for alle studenter uansett studieretning eller Hackerspace-medlemsskap. Vi tilbyr en kreativ arena der studenter fra forskjellige linjer kan få hjelp til å realisere idéene sine i et engasjert og inkluderende miljø. Hos oss finner du ny teknologi til din disposisjon, blant annet droner, 3D-printere og Virtual Reality-utstyr. Om du er en førsteklassing som trenger hjelp med ditt første Arduino-prosjekt eller en fjerdeklassing som ønsker å lage en 3D-modell av Trondheim, kan vi stille med både utstyr og kompetanse. Vi holder også regelmessig kurs for både nybegynnere og viderekomne innen mange spennende emner. Kom innom for å se hva vi driver med og slå av en prat. Du finner oss i andre etasje i A-blokka på Realfagbygget, NTNU Gløshaugen. ", "showMaps": "Vis kart!", "FAQ": "Ofte stilte spørsmål", diff --git a/src/app/[locale]/(default)/about/page.tsx b/src/app/[locale]/(default)/about/page.tsx index 57e419d..d7a4b43 100644 --- a/src/app/[locale]/(default)/about/page.tsx +++ b/src/app/[locale]/(default)/about/page.tsx @@ -18,49 +18,40 @@ export default function AboutPage({ const t = useTranslations('about'); const cardData = [ + { id: 1, title: t('example_title'), content: t('example_text'), link: `/${locale}/about/leaderboard`}, + { id: 2, title: t('example_title'), content: t('example_text'), link: `/${locale}/about/leaderboard`}, + { id: 3, title: t('example_title'), content: t('example_text'), link: `/${locale}/about/leaderboard`}, + { id: 3, title: t('example_title'), content: t('example_text'), link: `/${locale}/about/leaderboard`}, + { id: 3, title: t('example_title'), content: t('example_text'), link: `/${locale}/about/leaderboard`}, + { id: 3, title: t('example_title'), content: t('example_text'), link: `/${locale}/about/leaderboard`}, +]; + +const faqItems = [ { - id: 1, - title: t('example_title'), - content: t('example_text'), - - link: `/${locale}/about/leaderboard` - }, - { - id: 2, - title: t('example_title'), - content: t('example_text'), - - link: `/${locale}/about/leaderboard` - }, - { - id: 3, - title: t('example_title'), - content: t('example_text'), - - link: `/${locale}/about/leaderboard` - }, - { - id: 3, - title: t('example_title'), - content: t('example_text'), - - link: `/${locale}/about/leaderboard` + id: 'item-1', + icon: Printer, + question: t('canIUseThe3dPriner?'), + answer: t.rich('answerCanIUseThe3dPriner', { + p1: (chunks) =>

{chunks}

, + p2: (chunks) =>

{chunks}

+ }) }, { - id: 3, - title: t('example_title'), - content: t('example_text'), - - link: `/${locale}/about/leaderboard` + id: 'item-2', + icon: Gamepad2, + question: t('canITryVRGames/Equipment?'), + answer: t('answerCanITryVRGames/Equipment') }, { - id: 3, - title: t('example_title'), - content: t('example_text'), - - link: `/${locale}/about/leaderboard` - }, -] + id: 'item-3', + icon: SquareUserRound, + question: t('howDoIBecomeAMember?'), + answer: t.rich('answerHowDoIBecomeAMember', { + p1: (chunks) =>

{chunks}

, + p2: (chunks) =>

{chunks}

+ }) + } +]; return
@@ -68,74 +59,43 @@ const cardData = [ src="/about/pizzaWolfs-min.png" alt="pizza wolfs" height={400} - width={400} + width={400} + priority />
-

{t('whatIsHackerspace')}

{t.rich('inforAboutHackerSpace', { - p1: (chunks) =>

{chunks}

, - p2: (chunks) =>

{chunks}

, - p3: (chunks) =>

{chunks}

+ p1: (chunks) =>

{chunks}

, + p2: (chunks) =>

{chunks}

, + p3: (chunks) =>

{chunks}

})}
-
+
-
-

FAQ's

- - - -
- -

{t('canIUseThe3dPriner?')}

-
-
- - {t.rich('answerCanIUseThe3dPriner', { - p1: (chunks) =>

{chunks}

, - p2: (chunks) =>

{chunks}

- })} -
-
- - - -
- -

{t('canITryVRGames/Equipment?')}

-
-
- - {t('answerCanITryVRGames/Equipment')} - -
- - - -
- -

{t('howDoIBecomeAMember?')}

-
-
- - {t.rich('answerHowDoIBecomeAMember', { - p1: (chucks) =>

{chucks}

, - p2: (chucks) =>

{chucks}

- })} -
-
+ + {faqItems.map(item => ( + + +
+ +

{item.question}

+
+
+ + {item.answer} + +
+ ))}
-

{t('activeGroup')}