From d5344ed6b294ce78ddc64d0715ce067910b18d98 Mon Sep 17 00:00:00 2001 From: Daniel Neukirch Hansen Date: Tue, 12 Mar 2024 16:47:02 +0100 Subject: [PATCH] style: :lipstick: Implement radioButtons for topics and subTopic, started info om Cogito Implement radioButtons for topics and subTopic, started info om Cogito #21 --- components/AboutUs/General/Cogito.tsx | 14 +++++ components/AboutUs/General/Privacy.tsx | 12 ++++ components/AboutUs/General/SponsorProtal.tsx | 12 ++++ lib/types.ts | 2 - pages/about.tsx | 62 ++++++++++++++++++-- 5 files changed, 96 insertions(+), 6 deletions(-) create mode 100644 components/AboutUs/General/Cogito.tsx create mode 100644 components/AboutUs/General/Privacy.tsx create mode 100644 components/AboutUs/General/SponsorProtal.tsx diff --git a/components/AboutUs/General/Cogito.tsx b/components/AboutUs/General/Cogito.tsx new file mode 100644 index 0000000..bb929f6 --- /dev/null +++ b/components/AboutUs/General/Cogito.tsx @@ -0,0 +1,14 @@ +export const Cogito = () => { + return ( +
+
+

+ Info om Cogito +

+
+

RASK INFORMASJON

+
+
+
+ ); +}; diff --git a/components/AboutUs/General/Privacy.tsx b/components/AboutUs/General/Privacy.tsx new file mode 100644 index 0000000..053f880 --- /dev/null +++ b/components/AboutUs/General/Privacy.tsx @@ -0,0 +1,12 @@ +export const Privacy = () => { + return ( +
+
+

+ Personvern +

+

Kommer snart...

+
+
+ ); +}; diff --git a/components/AboutUs/General/SponsorProtal.tsx b/components/AboutUs/General/SponsorProtal.tsx new file mode 100644 index 0000000..e8f7764 --- /dev/null +++ b/components/AboutUs/General/SponsorProtal.tsx @@ -0,0 +1,12 @@ +export const SponsorPortal = () => { + return ( +
+
+

+ Sponsor Portal +

+

Kommer snart...

+
+
+ ); +}; diff --git a/lib/types.ts b/lib/types.ts index f583b7f..2abce25 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -35,5 +35,3 @@ export type MarketingAIResponse = { export type GetMembersType = { member_type: string; }; - -export type Topics = "Generelt" | "Organisasjonen" | "For Bedrifter"; diff --git a/pages/about.tsx b/pages/about.tsx index b6653bf..42b1214 100644 --- a/pages/about.tsx +++ b/pages/about.tsx @@ -5,16 +5,24 @@ import Footer from "../components/Footer/Footer"; import { useRouter } from "next/router"; import Button from "../components/Buttons/Button"; import Image from "next/image"; -import { Topics } from "../lib/types"; import { useState } from "react"; //Images // import NTNU from "../public/Logos/NTNU.png"; // import NAIL from "../public/Logos/norwegian_open_ai_lab.png"; import AboutUsBG from "../public/Team/AboutUsBG.png"; +import RadioButton from "../components/Buttons/RadioButton"; +import { Cogito } from "../components/AboutUs/General/Cogito"; +import { Privacy } from "../components/AboutUs/General/Privacy"; +import { SponsorPortal } from "../components/AboutUs/General/SponsorProtal"; + +type Topics = "Generelt" | "Organisasjonen" | "For Bedrifter"; +const mainButtons: Topics[] = ["Generelt", "Organisasjonen", "For Bedrifter"]; +const generalButtons = ["Info om Cogito", "Personvern", "Sponsor Portal"]; const About = () => { const [topic, setTopic] = useState("Generelt"); + const [subTopic, setSubTopic] = useState("Info om Cogito"); function timeout(delay: number) { return new Promise((res) => setTimeout(res, delay)); @@ -34,8 +42,11 @@ const About = () => { Om oss - Cogito NTNU
-
-
+
+
{ priority className="absolute inset-0 w-full h-full object-cover shadow-2xl" /> -
+

{topic}

+
+
+ {mainButtons.map((name) => ( + setTopic(name)} + /> + ))} +
+ {topic === "Generelt" && ( +
+ {generalButtons.map((name) => ( + setSubTopic(name)} + /> + ))} +
+ )} +
+ {topic === "Generelt" && subTopic === generalButtons[0] && } + {topic === "Generelt" && subTopic === generalButtons[1] && ( + + )} + {topic === "Generelt" && subTopic === generalButtons[2] && ( + + )}