@builder.io/sdk-react-nextjs 0.5.4 → 0.5.5
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.
|
@@ -3,5 +3,7 @@ import { init } from './init';
|
|
|
3
3
|
export function getPreviewContent(searchParams) {
|
|
4
4
|
init();
|
|
5
5
|
const id = getIdFromSearchParams(searchParams);
|
|
6
|
-
return typeof id === 'string'
|
|
6
|
+
return typeof id === 'string'
|
|
7
|
+
? globalThis._BUILDER_PREVIEW_LRU_CACHE.get(id)
|
|
8
|
+
: undefined;
|
|
7
9
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
'use server';
|
|
2
2
|
import { init } from './init';
|
|
3
|
-
export async function postPreviewContent({ key, value }) {
|
|
3
|
+
export async function postPreviewContent({ key, value, }) {
|
|
4
4
|
init();
|
|
5
5
|
globalThis._BUILDER_PREVIEW_LRU_CACHE.set(key, value);
|
|
6
|
-
return {
|
|
7
|
-
[key]: value
|
|
8
|
-
};
|
|
6
|
+
return { [key]: value };
|
|
9
7
|
}
|