Skip to content

Commit

Permalink
Merge pull request #122 from tinloof/navigator-util-hotfix
Browse files Browse the repository at this point in the history
Remove query and variables from deps
  • Loading branch information
stilyan-tinloof authored Jan 7, 2025
2 parents 9f99161 + 120cb3c commit 8892b21
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/loud-horses-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tinloof/sanity-studio": patch
---

Navigator hotfix
7 changes: 4 additions & 3 deletions packages/sanity-studio/src/plugins/navigator/utils/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ export const useSanityFetch = ({
documentStore.listenQuery(query, variables, {
perspective: "previewDrafts",
}),
[documentStore, query, variables],
),
// eslint-disable-next-line react-hooks/exhaustive-deps
[documentStore]
)
);

const loading = subscribe === undefined;
Expand Down Expand Up @@ -155,7 +156,7 @@ export function createPageTemplates(creatablePages: NormalizedCreatablePage[]) {
}

export function normalizeCreatablePages(
creatablePageTypes: PagesNavigatorPluginOptions["creatablePages"],
creatablePageTypes: PagesNavigatorPluginOptions["creatablePages"]
): NormalizedCreatablePage[] {
return (
creatablePageTypes?.map((page) => {
Expand Down

0 comments on commit 8892b21

Please sign in to comment.