From 2ddf85c9b345809ab6ac07a1d21239ffc5d6da12 Mon Sep 17 00:00:00 2001 From: mewdev Date: Thu, 5 Dec 2024 10:26:43 +0100 Subject: [PATCH] wip: clientWrapper workaround component, data test --- apps/web/app/[lang]/otazka/page.tsx | 31 ++++++++++++++++++----------- apps/web/app/temp/ClientWrapper.tsx | 11 ++++++++++ 2 files changed, 30 insertions(+), 12 deletions(-) create mode 100644 apps/web/app/temp/ClientWrapper.tsx diff --git a/apps/web/app/[lang]/otazka/page.tsx b/apps/web/app/[lang]/otazka/page.tsx index cffefe4..31e28fc 100644 --- a/apps/web/app/[lang]/otazka/page.tsx +++ b/apps/web/app/[lang]/otazka/page.tsx @@ -1,17 +1,24 @@ -"use client"; -import { QuestionWrapper } from "@repo/design-system/ui"; -import { BottomBar } from "@repo/design-system/ui"; +import { + ClientBottomBar, + ClientQuestionWrapper, +} from "../../temp/ClientWrapper"; + +export default async function Page() { + const res = await fetch( + "https://www.volebnikalkulacka.cz/data/instance/volebnikalkulacka.cz/krajske-2024/10-jihomoravsky/questions.json", + ); + + const data = await res.json(); + + console.log(data); -export default function Page() { return ( -
- - +
+ {data.map((item) => ( + {item.title} + ))} + +
); } - -// TODO -// 1. Buttons on mobile wihout texts WIDTH! -// 2. Statuses proper styling (bg) check with live -// 3. Bottom bar positioning diff --git a/apps/web/app/temp/ClientWrapper.tsx b/apps/web/app/temp/ClientWrapper.tsx new file mode 100644 index 0000000..5c809c9 --- /dev/null +++ b/apps/web/app/temp/ClientWrapper.tsx @@ -0,0 +1,11 @@ +"use client"; + +import { QuestionWrapper, BottomBar } from "@repo/design-system/ui"; + +export function ClientQuestionWrapper(props: any) { + return ; +} + +export function ClientBottomBar(props: any) { + return ; +}