init
This commit is contained in:
9
worklenz-frontend/src/hooks/useAuth.ts
Normal file
9
worklenz-frontend/src/hooks/useAuth.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { createAuthService } from '@/services/auth/auth.service';
|
||||
import { useMemo } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
export const useAuthService = () => {
|
||||
const navigate = useNavigate();
|
||||
const authService = useMemo(() => createAuthService(navigate), [navigate]);
|
||||
return authService;
|
||||
};
|
||||
Reference in New Issue
Block a user