feat: revalidate my pages breadcrumbs on demand
This commit is contained in:
committed by
Michael Zetterberg
parent
ba13a00b63
commit
0c4aa592cc
@@ -1,5 +1,9 @@
|
||||
"use client"
|
||||
import { cva } from "class-variance-authority"
|
||||
|
||||
import { Lang } from "@/constants/languages"
|
||||
import { trpc } from "@/lib/trpc/client"
|
||||
|
||||
import styles from "./maxWidth.module.css"
|
||||
|
||||
import type { MaxWidthProps } from "@/types/components/max-width"
|
||||
@@ -10,8 +14,11 @@ export default function MaxWidth({
|
||||
className,
|
||||
tag = "section",
|
||||
...props
|
||||
}: MaxWidthProps
|
||||
) {
|
||||
}: MaxWidthProps) {
|
||||
const d = trpc.contentstack.breadcrumbs.get.useQuery({
|
||||
locale: Lang.en,
|
||||
href: "/my-pages/overview",
|
||||
})
|
||||
const Cmp = tag
|
||||
return <Cmp className={maxWidthVariants({ className })} {...props} />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user