Skip to content

Commit

Permalink
Updating to new async server function pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
izaaklauer committed Dec 19, 2024
1 parent 7790bdb commit 1fafbe2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/organizations/org-slugs-in-urls.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ This guide is intended for apps that require org slugs in URLs. **It's recommend
import { auth } from '@clerk/nextjs/server'
import { OrganizationList } from '@clerk/nextjs'

export default function Home({ params }: { params: { slug: string } }) {
const { orgSlug } = auth()
export default async function Home({ params }: { params: { slug: string } }) {
const { orgSlug } = await auth();

// Check for a match between route param and active organization slug
// from the user's session, and if so, show the list of valid
Expand Down Expand Up @@ -220,8 +220,8 @@ This guide is intended for apps that require org slugs in URLs. **It's recommend
import { auth } from '@clerk/nextjs/server'
import { OrganizationList } from '@clerk/nextjs'

export default function Home({ params }: { params: { slug: string } }) {
const { orgSlug } = auth()
export default async function Home({ params }: { params: { slug: string } }) {
const { orgSlug } = await auth()

if (params.slug != orgSlug) {
return (
Expand Down

0 comments on commit 1fafbe2

Please sign in to comment.