diff --git a/playground/nextjs/pages/_app.tsx b/playground/nextjs/pages/_app.tsx index 0b3a9a27d5..b63cb24b60 100644 --- a/playground/nextjs/pages/_app.tsx +++ b/playground/nextjs/pages/_app.tsx @@ -73,7 +73,10 @@ const AppBar = (props: AppBarProps) => { hidePersonal afterLeaveOrganizationUrl={'https://www.google.com'} /> - +

Nextjs Playground

diff --git a/playground/nextjs/pages/api/sendEmail.ts b/playground/nextjs/pages/api/sendEmail.ts index 4c665a68f6..4db7885a28 100644 --- a/playground/nextjs/pages/api/sendEmail.ts +++ b/playground/nextjs/pages/api/sendEmail.ts @@ -1,12 +1,12 @@ import type { NextApiRequest, NextApiResponse } from 'next'; -import { getAuth, clerkClient } from '@clerk/nextjs/server'; +import { clerkClient, getAuth } from '@clerk/nextjs/server'; export default async function handler(req: NextApiRequest, res: NextApiResponse) { const { userId } = await getAuth(req); if (!userId) return res.status(401); const user = await clerkClient.users.getUser(userId); - const email = user.primaryEmailAddressId; + const email = user.data?.primaryEmailAddressId; if (!email) return res.status(422).json({ error: 'primaryEmailAddress is required!' }); diff --git a/playground/nextjs/pages/session-examples/index.tsx b/playground/nextjs/pages/session-examples/index.tsx index 752070f11e..ca392b7c9a 100644 --- a/playground/nextjs/pages/session-examples/index.tsx +++ b/playground/nextjs/pages/session-examples/index.tsx @@ -1,4 +1,4 @@ -import { WithSession, withSession, WithSessionProp, useSession } from '@clerk/nextjs'; +import { useSession, withSession, WithSession, WithSessionProp } from '@clerk/nextjs'; import { PublicUserData } from '@clerk/types'; import type { NextPage } from 'next'; import React from 'react'; @@ -49,7 +49,7 @@ const SessionExamplesPage: NextPage = () => { - + {/**/} ); }; diff --git a/playground/nextjs/pages/user-examples/index.tsx b/playground/nextjs/pages/user-examples/index.tsx index e0a349a652..3b543b83e5 100644 --- a/playground/nextjs/pages/user-examples/index.tsx +++ b/playground/nextjs/pages/user-examples/index.tsx @@ -53,7 +53,7 @@ const UserExamplesPage: NextPage = () => { - + {/**/} ); };