Improve dashboard prefetching and analytics charts
All checks were successful
Build Frontend / build (push) Successful in 1m14s
All checks were successful
Build Frontend / build (push) Successful in 1m14s
Removed dashboard prefetching from the login page to avoid unnecessary middleware redirects for unauthenticated users. Added delayed prefetching of dashboard routes after initial load for better navigation performance. Updated AdminAnalytics to use AreaChart instead of BarChart for daily metrics, improving visual clarity. Enhanced middleware to allow prefetch requests through without redirecting to login, supporting better caching and navigation.
This commit is contained in:
@@ -33,9 +33,7 @@ function LoginLoading() {
|
||||
export default function LoginPage() {
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
router.prefetch("/dashboard");
|
||||
}, [router]);
|
||||
// Removed prefetch to avoid middleware redirects when unauthenticated
|
||||
|
||||
return (
|
||||
<div className="relative flex items-center justify-center min-h-screen overflow-hidden">
|
||||
|
||||
Reference in New Issue
Block a user