This commit is contained in:
rizrmd 2024-02-15 10:09:11 -07:00
parent f58ee518c1
commit 4eebe5bb99
5 changed files with 13 additions and 4 deletions

View File

@ -99,6 +99,9 @@ export const Tab: FC<{
value={idx + ""} value={idx + ""}
onClick={() => { onClick={() => {
local.activeIndex = idx.toString(); local.activeIndex = idx.toString();
if (local.mode === "hash") {
location.hash = `#${local.activeIndex}`;
}
local.render(); local.render();
if (e.navigate) { if (e.navigate) {
navigate(e.navigate); navigate(e.navigate);

View File

@ -17,10 +17,15 @@ export const Form: FC<{
return ( return (
<FForm {...form_hook}> <FForm {...form_hook}>
<div <form
className={ className={
"flex-1 flex flex-col w-full items-stretch relative overflow-auto" "flex-1 flex flex-col w-full items-stretch relative overflow-auto"
} }
onSubmit={(e) => {
e.preventDefault();
e.stopPropagation();
on_submit({ form: form.hook.getValues(), error: {} });
}}
> >
<div className="absolute inset-0"> <div className="absolute inset-0">
<PassProp <PassProp
@ -31,7 +36,7 @@ export const Form: FC<{
{body} {body}
</PassProp> </PassProp>
</div> </div>
</div> </form>
</FForm> </FForm>
); );
}; };

View File

@ -60,7 +60,7 @@ export const List: FC<ListProp> = (_arg) => {
{local.list === null ? ( {local.list === null ? (
<ListDummy {..._arg} /> <ListDummy {..._arg} />
) : ( ) : (
local.list.map((item, idx) => { (local.list || []).map((item, idx) => {
const val = (...arg: any[]) => { const val = (...arg: any[]) => {
const value = get(map_val(item), `${arg.join("")}`); const value = get(map_val(item), `${arg.join("")}`);
return value; return value;

View File

@ -11,7 +11,7 @@ import {
} from "react-hook-form" } from "react-hook-form"
import { cn } from "@/utils" import { cn } from "@/utils"
import { Label } from "@/comps//ui/label" import { Label } from "@/comps/ui/label"
const Form = FormProvider const Form = FormProvider

View File

@ -2,6 +2,7 @@ export const getPathname = () => {
if (["localhost", "prasi.avolut.com"].includes(location.hostname)) { if (["localhost", "prasi.avolut.com"].includes(location.hostname)) {
if ( if (
location.pathname.startsWith("/vi") || location.pathname.startsWith("/vi") ||
location.pathname.startsWith("/prod") ||
location.pathname.startsWith("/deploy") location.pathname.startsWith("/deploy")
) { ) {
return "/" + location.pathname.split("/").slice(3).join("/"); return "/" + location.pathname.split("/").slice(3).join("/");