diff --git a/src/app/StyletronProviderWrapper.tsx b/src/app/StyletronProviderWrapper.tsx index 21563e950..00b9fe50f 100644 --- a/src/app/StyletronProviderWrapper.tsx +++ b/src/app/StyletronProviderWrapper.tsx @@ -1,10 +1,11 @@ 'use client'; +import React from "react"; import { Provider as StyletronProvider } from "styletron-react"; import { ThemeProvider } from "baseui/styles"; import { DarkTheme } from "baseui/themes"; import { styletron } from "../styletron"; -export default function StyletronProviderWrapper({ children }) { +export default function StyletronProviderWrapper({ children }: { children: React.ReactNode }) { return ( diff --git a/src/app/registry.tsx b/src/app/registry.tsx index 2b9ee928c..1fd8e7307 100644 --- a/src/app/registry.tsx +++ b/src/app/registry.tsx @@ -2,13 +2,14 @@ import React, { useRef } from 'react' import { useServerInsertedHTML } from 'next/navigation' import { styletron, } from '@/styletron'; +import { Server } from 'styletron-engine-monolithic'; export default function StyledJsxRegistry() { const isServerInserted = useRef(false); useServerInsertedHTML(() => { if (!isServerInserted.current) { isServerInserted.current = true; - const stylesheets = styletron.getStylesheets(); + const stylesheets = (styletron as Server).getStylesheets(); return <>{stylesheets.map((sheet, i) => (