Skip to content

Commit

Permalink
wip: clientWrapper workaround component, data test
Browse files Browse the repository at this point in the history
  • Loading branch information
mewdev committed Dec 5, 2024
1 parent 49962aa commit 2ddf85c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 12 deletions.
31 changes: 19 additions & 12 deletions apps/web/app/[lang]/otazka/page.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div className="grid h-96 content-between">
<QuestionWrapper />
<BottomBar />
<div>
{data.map((item) => (
<span>{item.title}</span>
))}
<ClientQuestionWrapper />
<ClientBottomBar />
</div>
);
}

// TODO
// 1. Buttons on mobile wihout texts WIDTH!
// 2. Statuses proper styling (bg) check with live
// 3. Bottom bar positioning
11 changes: 11 additions & 0 deletions apps/web/app/temp/ClientWrapper.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"use client";

import { QuestionWrapper, BottomBar } from "@repo/design-system/ui";

export function ClientQuestionWrapper(props: any) {
return <QuestionWrapper {...props} />;
}

export function ClientBottomBar(props: any) {
return <BottomBar {...props} />;
}

0 comments on commit 2ddf85c

Please sign in to comment.