diff options
author | Sebastian <sebasjm@gmail.com> | 2023-05-11 15:49:28 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-05-11 15:49:41 -0300 |
commit | fcfba4322ad0e27d7912fe5fcda6f4f362442e03 (patch) | |
tree | d678b2e271c5e955e88dbba44d52c802ba4a71cd /packages/exchange-backoffice-ui/src/Dashborad.tsx | |
parent | 359b9860a615b8421dcbb72b763b20f3cae24083 (diff) |
fix some ui in arrays and created input file
Diffstat (limited to 'packages/exchange-backoffice-ui/src/Dashborad.tsx')
-rw-r--r-- | packages/exchange-backoffice-ui/src/Dashborad.tsx | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/packages/exchange-backoffice-ui/src/Dashborad.tsx b/packages/exchange-backoffice-ui/src/Dashborad.tsx index 19ea4a31c..a8bac8ece 100644 --- a/packages/exchange-backoffice-ui/src/Dashborad.tsx +++ b/packages/exchange-backoffice-ui/src/Dashborad.tsx @@ -17,7 +17,7 @@ import { MagnifyingGlassIcon, } from "@heroicons/react/20/solid"; import { useRef, useState } from "preact/hooks"; -import { Form } from "./Form.js"; +import { NiceForm } from "./NiceForm.js"; const navigation = [ { name: "Dashboard", href: "#", icon: HomeIcon, current: true }, @@ -41,6 +41,28 @@ function classNames(...classes: string[]) { return classes.filter(Boolean).join(" "); } +/** + * mapping route to view + * not found (error page) + * nested, index element, relative routes + * link interception + * form POST interception, call action + * fromData => Object.fromEntries + * segments in the URL + * navigationState: idle, submitting, loading + * form GET interception: does a navigateTo + * form GET Sync: + * 1.- back after submit: useEffect to sync URL to form + * 2.- refresh after submit: input default value + * useSubmit for form submission onChange, history replace + * + * post form without redirect + * + * + * @param param0 + * @returns + */ + export function Dashboard({ children, }: { @@ -380,7 +402,7 @@ export function Dashboard({ <main class="py-10"> <div class="px-4 sm:px-6 lg:px-8"> <div class="mx-auto max-w-3xl"> - <Form + <NiceForm onUpdate={(v) => { if (!logRef.current) return; logRef.current.innerHTML = JSON.stringify(v, undefined, 1); |