diff --git a/src/routes/account.tsx b/src/routes/account.tsx index e9adb98..04a4ce0 100644 --- a/src/routes/account.tsx +++ b/src/routes/account.tsx @@ -1,6 +1,6 @@ -import { createSignal, createEffect, Show, onMount } from "solid-js"; +import { createSignal, Show, onMount } from "solid-js"; import { Title, Meta } from "@solidjs/meta"; -import { useNavigate, cache, redirect } from "@solidjs/router"; +import { useNavigate, redirect, query } from "@solidjs/router"; import { getEvent } from "vinxi/http"; import Eye from "~/components/icons/Eye"; import EyeSlash from "~/components/icons/EyeSlash"; @@ -23,7 +23,7 @@ type UserProfile = { hasPassword: boolean; }; -const checkAuth = cache(async () => { +const checkAuth = query(async () => { "use server"; const { checkAuthStatus } = await import("~/server/utils"); const event = getEvent()!; diff --git a/src/routes/login/index.tsx b/src/routes/login/index.tsx index 952546c..32478e1 100644 --- a/src/routes/login/index.tsx +++ b/src/routes/login/index.tsx @@ -3,8 +3,8 @@ import { A, useNavigate, useSearchParams, - cache, - redirect + redirect, + query } from "@solidjs/router"; import { Title, Meta } from "@solidjs/meta"; import { getEvent } from "vinxi/http"; @@ -17,7 +17,7 @@ import { isValidEmail, validatePassword } from "~/lib/validation"; import { getClientCookie } from "~/lib/cookies.client"; import { env } from "~/env/client"; -const checkAuth = cache(async () => { +const checkAuth = query(async () => { "use server"; const { checkAuthStatus } = await import("~/server/utils"); const event = getEvent()!; @@ -333,25 +333,31 @@ export default function LoginPage() { />