33 lines
814 B
TypeScript
33 lines
814 B
TypeScript
"use client";
|
|
|
|
import DashboardContainer from "@/components/main/dashboard/dashboard-container";
|
|
import { motion } from "framer-motion";
|
|
import { useEffect, useState } from "react";
|
|
|
|
export default function AdminPage() {
|
|
const [mounted, setMounted] = useState(false);
|
|
|
|
useEffect(() => {
|
|
setMounted(true);
|
|
}, []);
|
|
|
|
if (!mounted) {
|
|
return (
|
|
<div className="h-full overflow-auto bg-gray-50 flex items-center justify-center">
|
|
<div className="animate-spin rounded-full h-32 w-32 border-b-2 border-blue-500"></div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<motion.div
|
|
className="h-full overflow-auto bg-gray-50 dark:bg-black"
|
|
initial={{ opacity: 0 }}
|
|
animate={{ opacity: 1 }}
|
|
transition={{ duration: 0.3 }}
|
|
>
|
|
<DashboardContainer />
|
|
</motion.div>
|
|
);
|
|
}
|