Skip to content

Commit 2c0a6a4

Browse files
committed
fix: add common types page
1 parent 38e61fc commit 2c0a6a4

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

src/lib/auth/auth-client.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,7 @@
22

33
import { createContext, type ReactNode, useContext, useEffect, useState } from 'react';
44
import { AuthorizationError } from '../schemas/errors';
5-
6-
// We need to create a React context to get the current user on the frontend in the authenticated pages
7-
8-
export interface User {
9-
id: string | null;
10-
name: string | null;
11-
email: string | null;
12-
}
5+
import { type User } from '../types';
136

147
interface AuthContextType {
158
user: User;

src/lib/types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export interface User {
2+
id: string | null;
3+
name: string | null;
4+
email: string | null;
5+
}

0 commit comments

Comments
 (0)