update
This commit is contained in:
@@ -40,8 +40,8 @@ export async function loader({ params, request, context }: Route.LoaderArgs) {
|
||||
throw new Response(null, { status: r.status })
|
||||
}
|
||||
|
||||
const user: User = await r.json()
|
||||
return { user }
|
||||
const data = await r.json()
|
||||
return { data } as { data: any }
|
||||
}
|
||||
|
||||
export function shouldRevalidate({
|
||||
@@ -51,18 +51,14 @@ export function shouldRevalidate({
|
||||
return currentParams.id !== nextParams.id
|
||||
}
|
||||
|
||||
export type User = {
|
||||
name: string
|
||||
email: string
|
||||
cpf: string
|
||||
}
|
||||
|
||||
const links = [
|
||||
{ to: '', title: 'Perfil', end: true },
|
||||
{ to: 'emails', title: 'Emails' }
|
||||
]
|
||||
|
||||
export default function Route({ loaderData: { user } }: Route.ComponentProps) {
|
||||
export default function Route({
|
||||
loaderData: { data: user }
|
||||
}: Route.ComponentProps) {
|
||||
return (
|
||||
<div className="space-y-2.5">
|
||||
<Breadcrumb>
|
||||
|
||||
Reference in New Issue
Block a user