import { InferPageProps } from '@adonisjs/inertia/types'; import { Head } from '@inertiajs/react'; import useUser from '~/hooks/use_user'; import type AppsController from '../../app/controllers/apps_controller'; export default function Home(_: InferPageProps) { const { isAuthenticated, user } = useUser(); return ( <>
AdonisJS x Inertia x React
Learn more about AdonisJS and Inertia.js by visiting the{' '} AdonisJS documentation. {isAuthenticated ? 'Authenticated' : 'Not authenticated'} {isAuthenticated ? Logout : Login}
{JSON.stringify(user, null, 2)}
); }