Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions app/auth/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import { signIn } from "@/auth"
import Link from "@/components/Link"
import ThemedLogo from "@/components/ThemedLogoClient"

import styles from "./page.module.scss"

import { Button, Flex, Separator, Text } from "@radix-ui/themes"
import { Heading } from "@react-email/components"
import { Button, Flex, Heading, Separator, Text } from "@radix-ui/themes"
import { AuthError } from "next-auth"
import dynamic from "next/dynamic"
import { redirect } from "next/navigation"
import React from "react"
import { BsBoxArrowRight } from "react-icons/bs"

const ThemedLogo = dynamic(() => import("@/components/ThemedLogo"), { ssr: false })

const LoginPage = async ({ searchParams }: { searchParams?: { callbackUrl?: string } }) => {
const LoginPage = async (props: { searchParams?: Promise<{ callbackUrl?: string }> }) => {
const searchParams = await props.searchParams
const signInEntraID = async () => {
"use server"
try {
Expand Down
3 changes: 2 additions & 1 deletion app/companies/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ const CompanyDetail = ({ title, children }: { title: string; children: React.Rea
}
}

const CompanyPage = async ({ params }: { params: { slug: string } }) => {
const CompanyPage = async (props: { params: Promise<{ slug: string }> }) => {
const params = await props.params
const session = await auth()
const companyProfile = await prisma.companyProfile.findFirst({
where: {
Expand Down
3 changes: 2 additions & 1 deletion app/events/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import { notFound } from "next/navigation"
import React from "react"
import { BsBoxArrowUpRight, BsFileRichtext, BsPinMap } from "react-icons/bs"

const EventPage = async ({ params }: { params: { id: string } }) => {
const EventPage = async (props: { params: Promise<{ id: string }> }) => {
const params = await props.params
const session = await auth()
const id = parseInt(params.id, 10)

Expand Down
16 changes: 11 additions & 5 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import "@radix-ui/themes/utilities.css"
import { Metadata, Viewport } from "next"
import { ThemeProvider } from "next-themes"
import { Inter } from "next/font/google"
import Head from "next/head"
import { ReactNode } from "react"

// Next object for information in the HTML head
Expand Down Expand Up @@ -46,6 +45,13 @@ export const metadata: Metadata = {
type: "image/png",
},
],
other: [
{
rel: "mask-icon",
url: "/safari-pinned-tab.svg",
color: "#0000cd",
},
],
},

// rich previews
Expand Down Expand Up @@ -83,11 +89,11 @@ const RootLayout = ({
}: Readonly<{
children: ReactNode
}>) => {
// suppressHydrationWarning: next-themes sets `class` and `style` on <html> from a blocking
// script before hydration, so the server markup intentionally differs from the client's.
// See https://github.com/pacocoursey/next-themes#with-app
return (
<html lang="en">
<Head>
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#0000cd" />
</Head>
<html lang="en" suppressHydrationWarning>
{/* Hack: id added to increase specificity of styles to override margin added by react-scroll */}
<body className={inter.className} id="body">
<ThemeProvider attribute="class">
Expand Down
3 changes: 2 additions & 1 deletion app/opportunities/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import { notFound } from "next/navigation"
import React from "react"
import { BsBoxArrowUpRight, BsBriefcase, BsCalendar, BsCheckCircle, BsClock, BsPinMap, BsXCircle } from "react-icons/bs"

const OpportunityPage = async ({ params }: { params: { id: string } }) => {
const OpportunityPage = async (props: { params: Promise<{ id: string }> }) => {
const params = await props.params
const id = parseInt(params.id, 10)

if (isNaN(id) || id.toString() !== params.id) {
Expand Down
3 changes: 2 additions & 1 deletion app/students/[shortcode]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ const StudentWebsiteLink = ({ href, icon: Icon }: { href?: string | null; icon:
<> </>
)

const StudentProfilePage = async ({ params }: { params: { shortcode: string } }) => {
const StudentProfilePage = async (props: { params: Promise<{ shortcode: string }> }) => {
const params = await props.params
const studentProfile = await prisma.studentProfile.findFirst({
where: { studentShortcode: decodeURIComponent(params.shortcode) },
include: {
Expand Down
2 changes: 1 addition & 1 deletion auth.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default {
MicrosoftEntraIDProfile({
clientId: process.env.MS_ENTRA_CLIENT_ID,
clientSecret: process.env.MS_ENTRA_CLIENT_SECRET,
tenantId: process.env.MS_ENTRA_TENANT_ID,
issuer: `https://login.microsoftonline.com/${process.env.MS_ENTRA_TENANT_ID}/v2.0`,
authorization: {
params: {
scope: "offline_access openid profile email User.Read",
Expand Down
12 changes: 12 additions & 0 deletions components/ThemedLogoClient.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"use client"

import dynamic from "next/dynamic"

/**
* Client-side-only wrapper around {@link ThemedLogo}: the logo depends on the resolved theme,
* which is only known in the browser. `ssr: false` is not allowed in Server Components,
* so the dynamic import lives here.
*/
const ThemedLogoClient = dynamic(() => import("@/components/ThemedLogo"), { ssr: false })

export default ThemedLogoClient
2 changes: 1 addition & 1 deletion lib/authActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { signIn } from "@/auth"
import { FormPassBackState } from "./types"

import { AccessDenied } from "@auth/core/errors"
import { isRedirectError } from "next/dist/client/components/redirect"
import { isRedirectError } from "next/dist/client/components/redirect-error"

export const signInWithMagicLink = async (
_prevState: FormPassBackState,
Expand Down
Loading
Loading