Added a link for admins to go to the CMS
This commit is contained in:
@@ -16,6 +16,8 @@ import {
|
||||
BsPencilSquare,
|
||||
BsBank,
|
||||
BsCurrencyDollar,
|
||||
BsLayoutWtf,
|
||||
BsLayoutSidebar,
|
||||
} from "react-icons/bs";
|
||||
import UserCard from "@/components/UserCard";
|
||||
import useGroups from "@/hooks/useGroups";
|
||||
@@ -309,6 +311,12 @@ export default function AdminDashboard({user}: Props) {
|
||||
value={pending.length}
|
||||
color="rose"
|
||||
/>
|
||||
<IconCard
|
||||
onClick={() => router.push("https://cms.encoach.com/admin")}
|
||||
Icon={BsLayoutSidebar}
|
||||
label="Content Management System (CMS)"
|
||||
color="green"
|
||||
/>
|
||||
</section>
|
||||
|
||||
<section className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 w-full justify-between">
|
||||
|
||||
@@ -4,8 +4,8 @@ import {IconType} from "react-icons";
|
||||
interface Props {
|
||||
Icon: IconType;
|
||||
label: string;
|
||||
value: string | number;
|
||||
color: "purple" | "rose" | "red";
|
||||
value?: string | number;
|
||||
color: "purple" | "rose" | "red" | "green";
|
||||
tooltip?: string;
|
||||
onClick?: () => void;
|
||||
}
|
||||
@@ -15,6 +15,7 @@ export default function IconCard({Icon, label, value, color, tooltip, onClick}:
|
||||
purple: "text-mti-purple-light",
|
||||
red: "text-mti-red-light",
|
||||
rose: "text-mti-rose-light",
|
||||
green: "text-mti-green-light",
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -41,7 +41,7 @@ export const getServerSideProps = withIronSessionSsr(({req, res}) => {
|
||||
redirect: {
|
||||
destination: "/login",
|
||||
permanent: false,
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ export const getServerSideProps = withIronSessionSsr(({req, res}) => {
|
||||
redirect: {
|
||||
destination: "/",
|
||||
permanent: false,
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user