update login flow, in the middle,

This commit is contained in:
louiscklaw
2025-05-14 15:17:04 +08:00
parent af160edd42
commit 8d37fba393
29 changed files with 982 additions and 113 deletions

View File

@@ -0,0 +1,14 @@
import * as React from 'react';
import { UserContext } from '../contexts/auth/user-context';
import { UserContextValue } from '../contexts/auth/types';
export function useUser(): UserContextValue {
const context = React.useContext(UserContext);
if (!context) {
throw new Error('useUser must be used within a UserProvider');
}
return context;
}