feat: create content layout with emotion

This commit is contained in:
Sonny
2024-04-27 20:00:46 +02:00
committed by Sonny
parent df4185bd62
commit 08dcd7455f
23 changed files with 630 additions and 52 deletions

View File

@@ -1,5 +1,5 @@
import { InferPageProps } from '@adonisjs/inertia/types';
import { Head } from '@inertiajs/react';
import ContentLayout from '~/components/layouts/content_layout';
import useUser from '~/hooks/use_user';
import type AppsController from '../../app/controllers/apps_controller';
@@ -7,9 +7,7 @@ export default function Home(_: InferPageProps<AppsController, 'index'>) {
const { isAuthenticated, user } = useUser();
return (
<>
<Head title="Homepage" />
<ContentLayout>
<div className="container">
<div className="title">AdonisJS x Inertia x React</div>
@@ -19,11 +17,8 @@ export default function Home(_: InferPageProps<AppsController, 'index'>) {
</span>
<span>{isAuthenticated ? 'Authenticated' : 'Not authenticated'}</span>
<span>
{isAuthenticated ? <a href="/auth/logout">Logout</a> : <a href="/auth/login">Login</a>}
</span>
<pre>{JSON.stringify(user, null, 2)}</pre>
</div>
</>
</ContentLayout>
);
}