mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 22:53:25 +00:00
25 lines
854 B
TypeScript
25 lines
854 B
TypeScript
import { InferPageProps } from '@adonisjs/inertia/types';
|
|
import ContentLayout from '~/components/layouts/content_layout';
|
|
import useUser from '~/hooks/use_user';
|
|
import type AppsController from '../../app/controllers/apps_controller';
|
|
|
|
export default function Home(_: InferPageProps<AppsController, 'index'>) {
|
|
const { isAuthenticated, user } = useUser();
|
|
|
|
return (
|
|
<ContentLayout>
|
|
<div className="container">
|
|
<div className="title">AdonisJS x Inertia x React</div>
|
|
|
|
<span>
|
|
Learn more about AdonisJS and Inertia.js by visiting the{' '}
|
|
<a href="https://docs.adonisjs.com/guides/inertia">AdonisJS documentation</a>.
|
|
</span>
|
|
|
|
<span>{isAuthenticated ? 'Authenticated' : 'Not authenticated'}</span>
|
|
<pre>{JSON.stringify(user, null, 2)}</pre>
|
|
</div>
|
|
</ContentLayout>
|
|
);
|
|
}
|