Started creating a user type specific dashboard

This commit is contained in:
Tiago Ribeiro
2023-10-22 09:15:11 +01:00
parent e10aebf4c0
commit 7e576738ce
2 changed files with 91 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ import Link from "next/link";
import {MODULE_ARRAY} from "@/utils/moduleUtils";
import ProfileSummary from "@/components/ProfileSummary";
import StudentDashboard from "@/dashboards/Student";
import OwnerDashboard from "@/dashboards/Owner";
export const getServerSideProps = withIronSessionSsr(({req, res}) => {
const user = req.session.user;
@@ -164,7 +165,7 @@ export default function Home() {
{user.type === "teacher" && <StudentDashboard user={user} />}
{user.type === "admin" && <StudentDashboard user={user} />}
{user.type === "owner" && <StudentDashboard user={user} />}
{user.type === "developer" && <StudentDashboard user={user} />}
{user.type === "developer" && <OwnerDashboard user={user} />}
</Layout>
)}
</>