diff --git a/app/login/page.tsx b/app/login/page.tsx
new file mode 100644
index 0000000..9dc4902
--- /dev/null
+++ b/app/login/page.tsx
@@ -0,0 +1,3 @@
+export default async function LoginPage() {
+ return
login
;
+}
diff --git a/components/Calendar.tsx b/components/Calendar.tsx
index 5ba2ebc..d136981 100644
--- a/components/Calendar.tsx
+++ b/components/Calendar.tsx
@@ -15,7 +15,7 @@ export default function Calendar(props: any) {
console.log(eventInfo);
return (
{/*
diff --git a/components/navbar.tsx b/components/navbar.tsx
index bde0f12..ed1ac44 100644
--- a/components/navbar.tsx
+++ b/components/navbar.tsx
@@ -77,6 +77,7 @@ export const Navbar = (props: any) => {
);
// @ts-ignore
+ /*
if (session.user?.role === "admin") {
adminDashLink = (
@@ -85,7 +86,7 @@ export const Navbar = (props: any) => {
);
- }
+ }*/
nameButton = session.user?.name;
} else {
authenticated = false;
@@ -190,9 +191,6 @@ export const Navbar = (props: any) => {
My Courses
{loginLink}
-
- {adminDashLink}
-
) : (
<>>
diff --git a/lib/auth.ts b/lib/auth.ts
index 874fe95..2302ed5 100644
--- a/lib/auth.ts
+++ b/lib/auth.ts
@@ -10,6 +10,14 @@ import { getServerSession } from "next-auth";
// You'll need to import and pass this
// to `NextAuth` in `app/api/auth/[...nextauth]/route.ts`
export const config = {
+ //Set custom redirect pages
+ pages: {
+ signIn: "/login",
+ //signOut: "/auth/signout",
+ error: "/error", // Error code passed in query string as ?error=
+ //verifyRequest: "/auth/verify-request", // (used for check email message)
+ //newUser: "/auth/new-user", // New users will be directed here on first sign in (leave the property out if not of interest)
+ },
providers: [
KeycloakProvider({
profile(profile, tokens) {
@@ -33,7 +41,7 @@ export const config = {
callbacks: {
jwt({ token, user }) {
// @ts-ignore
- //if (user) token.role = user.role;
+ if (user) token.role = user.role;
return token;
},
session({ session, token }) {
diff --git a/middleware.ts b/middleware.ts
new file mode 100644
index 0000000..c7722a5
--- /dev/null
+++ b/middleware.ts
@@ -0,0 +1,9 @@
+import { withAuth } from "next-auth/middleware";
+
+export default withAuth({
+ // Matches the pages config in `[...nextauth]`
+ pages: {
+ signIn: "/login",
+ error: "/error",
+ },
+});
diff --git a/styles/globals.css b/styles/globals.css
index ffb33bb..b8cc390 100644
--- a/styles/globals.css
+++ b/styles/globals.css
@@ -22,6 +22,9 @@
transition: all 0.5s ease;
font-family: var(--font-sans);
}
+.fc-timegrid-event-harness:hover {
+ z-index: 10 !important;
+}
.fc-day-today {
background-color: inherit !important;
}