fix: authorization / registration
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user