Spaces:
Sleeping
Sleeping
File size: 552 Bytes
01d5a5d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
'use client';
import { StyleProvider, createCache, extractStyle } from '@ant-design/cssinjs';
import { useServerInsertedHTML } from 'next/navigation';
import type React from 'react';
const StyledComponentsRegistry = ({ children }: { children: React.ReactNode }): JSX.Element => {
const cache = createCache();
useServerInsertedHTML(() => (
<style dangerouslySetInnerHTML={{ __html: extractStyle(cache, true) }} id="antd" />
));
return <StyleProvider cache={cache}>{children}</StyleProvider>;
};
export default StyledComponentsRegistry;
|