From 0539d6963ebedd554cd3cd36b6c94df9659d6a6b Mon Sep 17 00:00:00 2001 From: Maksymilian Jopek Date: Mon, 28 Apr 2025 18:03:28 +0200 Subject: Initial commit Simple frontend version with mock API --- src/pages/*.tsx | 8 ++++++++ src/pages/index.module.css | 14 ++++++++++++++ src/pages/index.tsx | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 src/pages/*.tsx create mode 100644 src/pages/index.module.css create mode 100644 src/pages/index.tsx (limited to 'src/pages') diff --git a/src/pages/*.tsx b/src/pages/*.tsx new file mode 100644 index 0000000..a7021c6 --- /dev/null +++ b/src/pages/*.tsx @@ -0,0 +1,8 @@ +export default function NotFound() { + return ( +
+

404: Not Found

+

It's gone 😞

+
+ ); +} diff --git a/src/pages/index.module.css b/src/pages/index.module.css new file mode 100644 index 0000000..9d6167d --- /dev/null +++ b/src/pages/index.module.css @@ -0,0 +1,14 @@ +.btns-cont { + --btn-gap: 0.3rem; + /* padding: var(--btn-gap); */ + display: grid; + justify-items: center; + align-items: center; + gap: var(--btn-gap); + grid-template-columns: repeat(2, 1fr); +} +.timers-cont { + hr { + margin-top: 2em; + } +} diff --git a/src/pages/index.tsx b/src/pages/index.tsx new file mode 100644 index 0000000..d64f9e1 --- /dev/null +++ b/src/pages/index.tsx @@ -0,0 +1,33 @@ +import { For } from "solid-js"; +import { createAsync } from "@solidjs/router"; + +import Button from "@/components/Button"; +import Timer from "@/components/Timer"; +import { getButtons, getTimers } from "@/helpers/api"; +import styles from "./index.module.css"; + +export default function Home() { + const btns = createAsync(getButtons); + const timers = createAsync(getTimers); + + return ( + <> +
+ {(btn) =>
+
+ + {(timer) => ( + <> +
+ + + )} +
+
+ + ); +} -- cgit v1.3.1