chore: format project automatically before starting dev server

This commit is contained in:
2026-09-16 14:14:04 +03:30
parent 7c55b3916c
commit 812029fe84
66 changed files with 2088 additions and 1125 deletions
+14 -9
View File
@@ -51,13 +51,16 @@ export function AuthProvider({children}: {children: ReactNode}) {
}
}, []);
const finishLogin = useCallback((next: AuthSession) => {
persist(next);
setLoginOpen(false);
const callback = successCallback.current;
successCallback.current = undefined;
callback?.();
}, [persist]);
const finishLogin = useCallback(
(next: AuthSession) => {
persist(next);
setLoginOpen(false);
const callback = successCallback.current;
successCallback.current = undefined;
callback?.();
},
[persist],
);
const openLogin = useCallback((onSuccess?: () => void) => {
successCallback.current = onSuccess;
@@ -76,7 +79,9 @@ export function AuthProvider({children}: {children: ReactNode}) {
loginOpen,
openLogin,
closeLogin,
sendOtp: async phone => { await requestOtp(phone); },
sendOtp: async phone => {
await requestOtp(phone);
},
verifyOtp: async (phone, code) => finishLogin(await loginWithOtp(phone, code)),
loginPassword: async (phone, password) => finishLogin(await loginWithPassword(phone, password)),
updateProfile: async profile => {
@@ -90,7 +95,7 @@ export function AuthProvider({children}: {children: ReactNode}) {
return (
<AuthContext.Provider value={value}>
{children}
<AuthModal/>
<AuthModal />
</AuthContext.Provider>
);
}