diff --git a/app/(root)/blog/[slug]/page.tsx b/app/(root)/blog/[slug]/page.tsx index c5680dc..891e63b 100644 --- a/app/(root)/blog/[slug]/page.tsx +++ b/app/(root)/blog/[slug]/page.tsx @@ -26,7 +26,7 @@ import { Button } from "@/components/ui/button"; async function getData(slug: string) { const query = ` - *[_type == "blog" && slug.current == '${slug}'] { + *[_type == "blog" && slug.current == '${slug.replace(/\'/g, "\\'")}'] { "currentSlug": slug.current, title, content,