mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-10 07:25:35 +00:00
feat: apply new style on side-navigation component
This commit is contained in:
13
inertia/types/app.d.ts
vendored
13
inertia/types/app.d.ts
vendored
@@ -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[];
|
||||
};
|
||||
|
||||
1
inertia/types/emotion.d.ts
vendored
1
inertia/types/emotion.d.ts
vendored
@@ -24,6 +24,7 @@ declare module '@emotion/react' {
|
||||
darkBlue: string;
|
||||
darkestBlue: string;
|
||||
|
||||
lightestRed: string;
|
||||
lightRed: string;
|
||||
red: string;
|
||||
|
||||
|
||||
19
inertia/types/inertia.d.ts
vendored
19
inertia/types/inertia.d.ts
vendored
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user