feat: apply new style on side-navigation component

This commit is contained in:
Sonny
2024-05-10 16:30:27 +02:00
committed by Sonny
parent 5f5eece627
commit b5cda75790
22 changed files with 193 additions and 624 deletions

View File

@@ -1,4 +1,11 @@
import { Serialize } from '@tuyau/utils/types';
import type UserModel from '../../app/models/user';
import type Collection from '#models/collection';
type User = Serialize<UserModel>;
type User = {
id: string;
email: string;
name: string;
nickName: string;
avatarUrl: string;
isAdmin: boolean;
collections: Collection[];
};

View File

@@ -24,6 +24,7 @@ declare module '@emotion/react' {
darkBlue: string;
darkestBlue: string;
lightestRed: string;
lightRed: string;
red: string;

View File

@@ -1,8 +1,17 @@
import type { User } from './app';
export type InertiaPage<T extends Record<string, unknown> = Record<string, unknown>> = T & {
auth: {
user?: User;
isAuthenticated: boolean;
};
type Auth =
| {
isAuthenticated: true;
user: User;
}
| {
isAuthenticated: false;
user: null;
};
export type InertiaPage<
T extends Record<string, unknown> = Record<string, unknown>,
> = T & {
auth: Auth;
};