Refactor of dashboard page with breadcrumbs and cleaner component
This commit is contained in:
25
frontend/src/app/(main)/dashboard/events/page.tsx
Normal file
25
frontend/src/app/(main)/dashboard/events/page.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
export default function EventsRedirectPage() {
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
// Redirect to dashboard home page
|
||||
router.push("/dashboard");
|
||||
}, [router]);
|
||||
|
||||
// Show a loading state while redirecting
|
||||
return (
|
||||
<div className="flex items-center justify-center min-h-[60vh]">
|
||||
<div className="text-center">
|
||||
<div className="h-8 w-8 mx-auto border-4 border-t-blue-500 border-blue-200 rounded-full animate-spin mb-4"></div>
|
||||
<p className="text-gray-500 dark:text-gray-400">
|
||||
Redirecting to dashboard...
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user