fix: conflict

This commit is contained in:
boboiazumi
2025-05-30 14:26:04 +07:00
140 changed files with 6357 additions and 8740 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ export const useAuthStore = create<SessionState>((set) => {
return {
isLoading: false,
session: isAuthenticated ? { ...session, ...user } : undefined,
session: isAuthenticated ? { token: session.token, user } : undefined,
status: isAuthenticated
? ESessionStatus.Authenticated
: ESessionStatus.Unauthenticated,
+5 -1
View File
@@ -6,7 +6,10 @@ import { useNavigate } from 'react-router';
export const useSession = () => {
const navigate = useNavigate();
const { mutate, isPending } = usePostLogin();
const { setLoading, setSession, clearSession, session } = useAuthStore();
const { setLoading, setSession, clearSession, session, status } =
useAuthStore();
const isAuthenticated = status === 'authenticated';
const signIn = (payload: TLoginRequest) => {
setLoading(true);
mutate(payload, {
@@ -33,5 +36,6 @@ export const useSession = () => {
signIn,
signOut,
isLoading: isPending,
isAuthenticated,
};
};