Skip to content

Commit

Permalink
revert "hotfix(dashboard): cache revalidate conflicts with clerk" (#1193
Browse files Browse the repository at this point in the history
)
  • Loading branch information
IGassmann committed Feb 27, 2024
1 parent 2e5fe2a commit e3d97ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import { revalidatePath } from 'next/cache';
import { CreateOrganization } from '@clerk/nextjs';

import SplitView from '@/app/(auth)/SplitView';

export default function CreateOrganizationPage() {
// We run revalidatePath to clear Next.js cache so that the user doesn't get stale data from a
// previous organization if they switch organizations.
revalidatePath('/', 'layout');

return (
<SplitView>
<div className="mx-auto my-auto text-center">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { revalidatePath } from 'next/cache';
import { OrganizationList } from '@clerk/nextjs';

import SplitView from '@/app/(auth)/SplitView';
Expand All @@ -7,6 +8,10 @@ type OrganizationListPageProps = {
};

export default async function OrganizationListPage({ searchParams }: OrganizationListPageProps) {
// We run revalidatePath to clear Next.js cache so that the user doesn't get stale data from a
// previous organization if they switch organizations.
revalidatePath('/', 'layout');

const redirectURL =
typeof searchParams.redirect_url === 'string'
? searchParams.redirect_url
Expand Down

0 comments on commit e3d97ad

Please sign in to comment.