Skip to content

Commit

Permalink
fix: add revalidate to project updates
Browse files Browse the repository at this point in the history
  • Loading branch information
fgmadeira committed Mar 15, 2024
1 parent be733b8 commit c347a34
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ethereal-nexus-dashboard/src/data/projects/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { and, desc, eq, getTableColumns, sql } from 'drizzle-orm';
import { projectComponentConfig, projects } from './schema';
import { insertMembers, userIsMember } from '@/data/member/actions';
import { componentAssets, components, componentVersions } from '@/data/components/schema';
import { revalidatePath, revalidateTag } from 'next/cache';

export async function getProjects(
userId: string | undefined | null,
Expand Down Expand Up @@ -478,6 +479,7 @@ export async function upsertProject(
}
}

revalidatePath(`/projects`, 'page')
return actionSuccess(result.data);
} catch (error) {
console.error(error);
Expand Down Expand Up @@ -526,6 +528,7 @@ export async function upsertComponentConfig(
);
}

revalidatePath('/(layout)/(session)/projects/[id]', 'layout')
return actionSuccess(safe.data);
} catch (error) {
console.error(error);
Expand Down

0 comments on commit c347a34

Please sign in to comment.