17 lines
430 B
JavaScript
17 lines
430 B
JavaScript
"use client";
|
|
import React from 'react';
|
|
import { NEXT_DYNAMIC_NO_SSR_CODE } from './no-ssr-error';
|
|
|
|
export function suspense() {
|
|
const error = new Error(NEXT_DYNAMIC_NO_SSR_CODE);
|
|
error.digest = NEXT_DYNAMIC_NO_SSR_CODE;
|
|
throw error;
|
|
}
|
|
export default function NoSSR({ children }) {
|
|
if (typeof window === 'undefined') {
|
|
suspense();
|
|
}
|
|
return children;
|
|
};
|
|
|
|
//# sourceMappingURL=dynamic-no-ssr.js.map
|