fix: authorization / registration

This commit is contained in:
2026-05-10 19:24:32 +03:00
parent 574e27a379
commit 8b0e787fc6
11 changed files with 140 additions and 39 deletions

View File

@@ -1,3 +1,6 @@
export function useIsAuthenticated(): boolean {
return localStorage.getItem('isAuthenticated') === 'true'
import { useAuth } from './useAuth'
export function useIsAuthenticated(): { isAuthenticated: boolean; isLoading: boolean } {
const { data, isLoading, isError } = useAuth()
return { isAuthenticated: !!data && !isError, isLoading }
}