+
+
- Enter the user email and get user's information just by one click
+ Enter the user email and get user's information just by one
+ click
-
);
}
diff --git a/src/app/admin/layout.tsx b/src/app/admin/layout.tsx
index 87e6eefc2..616028c5f 100644
--- a/src/app/admin/layout.tsx
+++ b/src/app/admin/layout.tsx
@@ -14,12 +14,20 @@ export default async function AdminLayout({
}
if (process.env.LOCAL_CMS_PROVIDER) {
- return
{children}
;
+ return (
+
+ {children}
+
+ );
}
if (!process.env.ADMINS?.split(',').includes(session.user.email!)) {
return notFound();
}
- return
{children}
;
+ return (
+
+ {children}
+
+ );
}
diff --git a/src/app/admin/page.tsx b/src/app/admin/page.tsx
index ad7da0e30..dd0ba761d 100644
--- a/src/app/admin/page.tsx
+++ b/src/app/admin/page.tsx
@@ -1,6 +1,13 @@
'use client';
import { AnimatePresence, motion } from 'framer-motion';
-import { FileText, Flag, LucideIcon, MessageCircle, PackagePlus, Users } from 'lucide-react';
+import {
+ FileText,
+ Flag,
+ LucideIcon,
+ MessageCircle,
+ PackagePlus,
+ Users,
+} from 'lucide-react';
import { useSession } from 'next-auth/react';
import Link from 'next/link';
import React, { useState } from 'react';
@@ -42,7 +49,7 @@ export default function AdminPage() {
title: string;
description: string;
exploreText: string;
- }
+ };
const cardsData: CardData[] = [
{
@@ -89,11 +96,16 @@ export default function AdminPage() {
},
];
- const AdminCard: React.FC
= ({ href, icon: Icon, title, description, exploreText }) => {
+ const AdminCard: React.FC = ({
+ href,
+ icon: Icon,
+ title,
+ description,
+ exploreText,
+ }) => {
const [isHovered, setIsHovered] = useState(false);
return (
-
setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
- className='h-[15rem] overflow-hidden relative group cursor-pointer hover:border-blue-500 transition-all duration-200 ease-linear flex flex-col items-center justify-center p-4 rounded-lg border-2 w-full'
+ className="group relative flex h-[15rem] w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-lg border-2 p-4 transition-all duration-200 ease-linear hover:border-blue-500"
>
-
-
+
+
-
-
{title}
+
+
{title}
{isHovered && (
@@ -118,7 +130,7 @@ export default function AdminPage() {
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: 20 }}
transition={{ duration: 0.3 }}
- className='text-sm text-gray-400 transition-all duration-200 ease-linear'
+ className="text-sm text-gray-400 transition-all duration-200 ease-linear"
>
{description}
@@ -126,7 +138,7 @@ export default function AdminPage() {
)}
-
+
{exploreText}
@@ -135,17 +147,21 @@ export default function AdminPage() {
};
return (
-
-
- {greeting}, {user?.name}
- Welcome! Explore more from below
+
+
+
+ {greeting}, {user?.name}
+
+
+ Welcome! Explore more from below
+
-
+
{cardsData.map((card, index) => (
))}
);
-}
\ No newline at end of file
+}
diff --git a/src/app/admin/user/LogoutUser.tsx b/src/app/admin/user/LogoutUser.tsx
index a9f8f66eb..fe131472c 100644
--- a/src/app/admin/user/LogoutUser.tsx
+++ b/src/app/admin/user/LogoutUser.tsx
@@ -10,7 +10,7 @@ import {
AccordionContent,
AccordionItem,
AccordionTrigger,
-} from "@/components/ui/accordion";
+} from '@/components/ui/accordion';
import { LogOut } from 'lucide-react';
const LogoutUserComp = () => {
@@ -26,29 +26,37 @@ const LogoutUserComp = () => {
toast.info(res.message || res.error);
};
return (
-
-