fix: frontend router not found fix

This commit is contained in:
2024-03-16 10:40:17 +07:00
parent 99c479ade2
commit 4dfa1decfe
5 changed files with 18 additions and 10 deletions
+5 -4
View File
@@ -38,6 +38,8 @@ const LoginPage = () => {
},
});
const onSubmit = form.handleSubmit((val) => login.mutate(val));
return (
<ScrollView
contentContainerStyle={cn("flex-1 flex items-center justify-center")}
@@ -51,6 +53,7 @@ const LoginPage = () => {
form={form}
path="username"
className="mt-6"
onSubmitEditing={onSubmit}
/>
<Input
label="Password"
@@ -58,14 +61,12 @@ const LoginPage = () => {
path="password"
className="mt-4"
secureTextEntry
onSubmitEditing={onSubmit}
/>
<Alert className="mt-4" error={login.error} />
<Button
className="mt-8"
onPress={form.handleSubmit((val) => login.mutate(val))}
>
<Button className="mt-8" onPress={onSubmit}>
Login
</Button>
</Box>
+1 -1
View File
@@ -10,7 +10,7 @@ import type {
import type { AppType } from "../../backend/routes/_routes";
import authStore, { logout } from "@/stores/authStore";
const api: ReturnType<typeof hono<AppType>> = hc(API_BASEURL, {
const api: ReturnType<typeof hono<AppType>> = hc(API_BASEURL + "/api", {
fetch: fetchHandler,
});