Skip to content

Commit 517c430

Browse files
committed
Update dependencies and fix page link references in page-builder block
1 parent 8b6e532 commit 517c430

File tree

1 file changed

+8
-18
lines changed

1 file changed

+8
-18
lines changed

nextjs-app/sanity.types.ts

+8-18
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ export type SettingsQueryResult = {
505505
};
506506
} | null;
507507
// Variable: getPageQuery
508-
// Query: *[_type == 'page' && slug.current == $slug][0]{ _id, _type, name, slug, heading, subheading, "pageBuilder": pageBuilder[]{ ..., _type == "callToAction" => { ..., link { ..., _type == "link" => { "page": page->slug.current, "post": post->slug.current } }, } }, }
508+
// Query: *[_type == 'page' && slug.current == $slug][0]{ _id, _type, name, slug, heading, subheading, "pageBuilder": pageBuilder[]{ ..., _type == "callToAction" => { link { ..., _type == "link" => { "page": page->slug.current, "post": post->slug.current } }, }, _type == "infoSection" => { content[]{ ..., markDefs[]{ ..., _type == "link" => { "page": page->slug.current, "post": post->slug.current } } } }, }, }
509509
export type GetPageQueryResult = {
510510
_id: string;
511511
_type: "page";
@@ -532,7 +532,7 @@ export type GetPageQueryResult = {
532532
_type: "infoSection";
533533
heading?: string;
534534
subheading?: string;
535-
content?: Array<{
535+
content: Array<{
536536
children?: Array<{
537537
marks?: Array<string>;
538538
text?: string;
@@ -541,29 +541,19 @@ export type GetPageQueryResult = {
541541
}>;
542542
style?: "blockquote" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "normal";
543543
listItem?: "bullet" | "number";
544-
markDefs?: Array<{
544+
markDefs: Array<{
545545
linkType?: "href" | "page" | "post";
546546
href?: string;
547-
page?: {
548-
_ref: string;
549-
_type: "reference";
550-
_weak?: boolean;
551-
[internalGroqTypeReferenceTo]?: "page";
552-
};
553-
post?: {
554-
_ref: string;
555-
_type: "reference";
556-
_weak?: boolean;
557-
[internalGroqTypeReferenceTo]?: "post";
558-
};
547+
page: string | null;
548+
post: string | null;
559549
openInNewTab?: boolean;
560550
_type: "link";
561551
_key: string;
562-
}>;
552+
}> | null;
563553
level?: number;
564554
_type: "block";
565555
_key: string;
566-
}>;
556+
}> | null;
567557
}> | null;
568558
} | null;
569559
// Variable: allPostsQuery
@@ -718,7 +708,7 @@ import "@sanity/client";
718708
declare module "@sanity/client" {
719709
interface SanityQueries {
720710
"*[_type == \"settings\"][0]": SettingsQueryResult;
721-
"\n *[_type == 'page' && slug.current == $slug][0]{\n _id,\n _type,\n name,\n slug,\n heading,\n subheading,\n \"pageBuilder\": pageBuilder[]{\n ...,\n _type == \"callToAction\" => {\n ...,\n \n link {\n ...,\n \n _type == \"link\" => {\n \"page\": page->slug.current,\n \"post\": post->slug.current\n }\n\n }\n,\n }\n },\n }\n": GetPageQueryResult;
711+
"\n *[_type == 'page' && slug.current == $slug][0]{\n _id,\n _type,\n name,\n slug,\n heading,\n subheading,\n \"pageBuilder\": pageBuilder[]{\n ...,\n _type == \"callToAction\" => {\n \n link {\n ...,\n \n _type == \"link\" => {\n \"page\": page->slug.current,\n \"post\": post->slug.current\n }\n\n }\n,\n },\n _type == \"infoSection\" => {\n content[]{\n ...,\n markDefs[]{\n ...,\n \n _type == \"link\" => {\n \"page\": page->slug.current,\n \"post\": post->slug.current\n }\n\n }\n }\n },\n },\n }\n": GetPageQueryResult;
722712
"\n *[_type == \"post\" && defined(slug.current)] | order(date desc, _updatedAt desc) {\n \n _id,\n \"status\": select(_originalId in path(\"drafts.**\") => \"draft\", \"published\"),\n \"title\": coalesce(title, \"Untitled\"),\n \"slug\": slug.current,\n excerpt,\n coverImage,\n \"date\": coalesce(date, _updatedAt),\n \"author\": author->{firstName, lastName, picture},\n\n }\n": AllPostsQueryResult;
723713
"\n *[_type == \"post\" && _id != $skip && defined(slug.current)] | order(date desc, _updatedAt desc) [0...$limit] {\n \n _id,\n \"status\": select(_originalId in path(\"drafts.**\") => \"draft\", \"published\"),\n \"title\": coalesce(title, \"Untitled\"),\n \"slug\": slug.current,\n excerpt,\n coverImage,\n \"date\": coalesce(date, _updatedAt),\n \"author\": author->{firstName, lastName, picture},\n\n }\n": MorePostsQueryResult;
724714
"\n *[_type == \"post\" && slug.current == $slug] [0] {\n content[]{\n ...,\n markDefs[]{\n ...,\n \n _type == \"link\" => {\n \"page\": page->slug.current,\n \"post\": post->slug.current\n }\n\n }\n },\n \n _id,\n \"status\": select(_originalId in path(\"drafts.**\") => \"draft\", \"published\"),\n \"title\": coalesce(title, \"Untitled\"),\n \"slug\": slug.current,\n excerpt,\n coverImage,\n \"date\": coalesce(date, _updatedAt),\n \"author\": author->{firstName, lastName, picture},\n\n }\n": PostQueryResult;

0 commit comments

Comments
 (0)