next-sanity 5.2.5 → 5.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-sanity",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.6",
|
|
4
4
|
"description": "Sanity.io toolkit for Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity",
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
"singleQuote": true
|
|
161
161
|
},
|
|
162
162
|
"dependencies": {
|
|
163
|
-
"@sanity/preview-kit": "2.4.
|
|
163
|
+
"@sanity/preview-kit": "2.4.12",
|
|
164
164
|
"@sanity/webhook": "2.0.0",
|
|
165
165
|
"groq": "^3.0.0"
|
|
166
166
|
},
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Tests the pattern used by next-sanity
|
|
2
|
+
|
|
3
|
+
import type {LiveQueryProviderProps} from '@sanity/preview-kit'
|
|
4
|
+
import dynamic from 'next/dynamic'
|
|
5
|
+
|
|
6
|
+
export type {CacheOptions, LiveQueryProviderProps, Logger} from '@sanity/preview-kit'
|
|
7
|
+
|
|
8
|
+
const GroqStoreProvider = dynamic(
|
|
9
|
+
() => import('@sanity/preview-kit/internals/groq-store-provider'),
|
|
10
|
+
)
|
|
11
|
+
const LiveStoreProvider = dynamic(
|
|
12
|
+
() => import('@sanity/preview-kit/internals/live-store-provider'),
|
|
13
|
+
)
|
|
14
|
+
const DynamicLiveQueryProvider = dynamic(
|
|
15
|
+
() => import('@sanity/preview-kit/internals/live-query-provider'),
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
// eslint-disable-next-line no-console
|
|
19
|
+
console.log('app/LazyLiveQueryProvider.tsx')
|
|
20
|
+
|
|
21
|
+
export default function LiveQueryProvider(props: LiveQueryProviderProps): React.JSX.Element {
|
|
22
|
+
return (
|
|
23
|
+
<DynamicLiveQueryProvider
|
|
24
|
+
{...props}
|
|
25
|
+
GroqStoreProvider={GroqStoreProvider}
|
|
26
|
+
LiveStoreProvider={LiveStoreProvider}
|
|
27
|
+
/>
|
|
28
|
+
)
|
|
29
|
+
}
|