revalidatepath not working on tabs using schadcn/ui
Unanswered
Gharial posted this in #help-forum
GharialOP
hi i use schadcn/ui and i use tabs (https://ui.shadcn.com/docs/components/tabs) and when i update something and its done in database with nextserver action
i revalidate the path :
then its not revalidating and i need to refresh the page OR change tab and go in the tab for see the actual data
i revalidate the path :
revalidatePath(`/dashboard/${props.slug}`);
// event when i do it like this not working :
revalidatePath(`/dashboard/my-page`);then its not revalidating and i need to refresh the page OR change tab and go in the tab for see the actual data
1 Reply
GharialOP
this is what look like my tabs :
<Tabs defaultValue="overview">
<div className="flex gap-2 pl-2 px-4 sm:px-0">
<Link href="/dashboard" passHref>
<Button variant="outline" size="icon" className="border-none">
<ArrowLeft />
</Button>
</Link>
<TabsList>
<TabsTrigger value="overview">Analytics</TabsTrigger>
<TabsTrigger value="link">Link Settings</TabsTrigger>
</TabsList>
</div>
<TabsContent value="overview">
// code here
</TabsContent>
<TabsContent value="link">
//code here
</TabsContent>
</Tabs>