Skip to content

Commit

Permalink
feat: handle title bill
Browse files Browse the repository at this point in the history
  • Loading branch information
DomeT99 committed Apr 15, 2024
1 parent 0d47fe1 commit 56d06ce
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
export default component$(() => {
const nav = useNavigate();
const recentBills = useSignal<RecentBill[]>([]);
const titleBill = useSignal<string>("");

// eslint-disable-next-line qwik/no-use-visible-task
useVisibleTask$(() => {
Expand All @@ -21,7 +22,7 @@ export default component$(() => {
sessionStorage.setItem(
"NEWBILL",
JSON.stringify({
name: "Untitled Bill",
name: titleBill.value || "Untitled Bill",
membersCount: 3,
}),
);
Expand All @@ -34,6 +35,15 @@ export default component$(() => {
<main>
<div class="flex flex-col gap-10 items-center">
<h2 class="text-3xl">Split your travel expenses easily</h2>
<div>
<input
type="text"
class="w-full shadow border-2 rounded p-1"
placeholder="Bill name"
value={titleBill.value}
onInput$={(_, el) => (titleBill.value = el.value)}
/>
</div>
<div>
<Button size={"big"} onClick$={onStart}>
Start!
Expand Down

0 comments on commit 56d06ce

Please sign in to comment.