mirror of
https://github.com/kennethnym/aris.git
synced 2026-06-13 19:11:18 +01:00
refactor: replace eslint/prettier with oxlint/oxfmt in admin-dashboard (#109)
Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
@@ -1,22 +1,24 @@
|
||||
import { createRoute, useNavigate } from "@tanstack/react-router"
|
||||
import { useQueryClient } from "@tanstack/react-query"
|
||||
import { createRoute, useNavigate } from "@tanstack/react-router"
|
||||
|
||||
import type { AuthSession } from "@/lib/auth"
|
||||
|
||||
import { LoginPage } from "@/components/login-page"
|
||||
|
||||
import { Route as rootRoute } from "./__root"
|
||||
|
||||
export const Route = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: "/login",
|
||||
component: function LoginRoute() {
|
||||
const navigate = useNavigate()
|
||||
const queryClient = useQueryClient()
|
||||
getParentRoute: () => rootRoute,
|
||||
path: "/login",
|
||||
component: function LoginRoute() {
|
||||
const navigate = useNavigate()
|
||||
const queryClient = useQueryClient()
|
||||
|
||||
function handleLogin(session: AuthSession) {
|
||||
queryClient.setQueryData(["session"], session)
|
||||
navigate({ to: "/" })
|
||||
}
|
||||
function handleLogin(session: AuthSession) {
|
||||
queryClient.setQueryData(["session"], session)
|
||||
navigate({ to: "/" })
|
||||
}
|
||||
|
||||
return <LoginPage onLogin={handleLogin} />
|
||||
},
|
||||
return <LoginPage onLogin={handleLogin} />
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user