feat: revalidate my pages breadcrumbs on demand

This commit is contained in:
Simon Emanuelsson
2024-04-16 12:42:44 +02:00
committed by Michael Zetterberg
parent ba13a00b63
commit 0c4aa592cc
24 changed files with 322 additions and 57 deletions

View File

@@ -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} />
}