Dorian Niemiec
e3ec044db8
Some checks failed
Deploy Next.js application / deploy (push) Has been cancelled
12 lines
274 B
TypeScript
12 lines
274 B
TypeScript
import { client } from "./sanity";
|
|
|
|
export const getAllBlogPostSlugs = async () => {
|
|
const query = `*[_type == 'blog'] { "slug": slug.current }`;
|
|
const slugs: { slug: string }[] = await client.fetch(
|
|
query,
|
|
{},
|
|
{ cache: "no-store" }
|
|
);
|
|
|
|
return slugs;
|
|
};
|