Skip to content

Commit

Permalink
Merge pull request #38 from Lab-Lab-Lab/main
Browse files Browse the repository at this point in the history
fix login redirect issue and single-course course selector bug
  • Loading branch information
hcientist committed Sep 13, 2024
2 parents c154968 + 09445c7 commit a4c9bfa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/courseSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ function CourseSelector() {
) {
return (
<Nav.Item>
<Link href={`/courses/${enrollments[0].course.slug}`} passHref>
<Link
href={`/courses/${enrollments[0].course.slug}`}
passHref
legacyBehavior
>
<Nav.Link>{enrollments[0].course.name}</Nav.Link>
</Link>
</Nav.Item>
Expand Down
3 changes: 3 additions & 0 deletions pages/api/auth/[...nextauth].js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ export default NextAuth({
returnVal = absUrl;
}
// maybe this was blocking me from reaching auth??
if (returnVal.includes('/auth/signout')) {
returnVal = '/';
}
return returnVal;
},
async session({ session, token, user }) {
Expand Down

0 comments on commit a4c9bfa

Please sign in to comment.