Refactor useAuth imports to utilize AuthContext and enhance test store injection handling

- Replaced `useAuthStore` imports with `useAuth` from `AuthContext` in `AuthGuard` and `Header` for consistency.
- Enhanced `getAuthStore` to prioritize E2E test store injection for improved testability.
- Updated comments to reflect changes and clarify usage patterns.
This commit is contained in:
Felipe Cardoso
2025-11-04 00:01:33 +01:00
parent 4bf34ea287
commit 26d43ff9e1
3 changed files with 11 additions and 2 deletions

View File

@@ -8,7 +8,7 @@
import { useEffect, useState } from 'react';
import { useRouter, usePathname } from 'next/navigation';
import { useAuth } from '@/lib/stores';
import { useAuth } from '@/lib/auth/AuthContext';
import { useMe } from '@/lib/api/hooks/useAuth';
import { AuthLoadingSkeleton } from '@/components/layout';
import config from '@/config/app.config';