permulaan

This commit is contained in:
bipproduction
2023-07-27 15:19:55 +08:00
parent adebf524e8
commit 99c21f0ce4
17 changed files with 898 additions and 163 deletions

31
src/app/emotion.tsx Normal file
View File

@@ -0,0 +1,31 @@
'use client';
// import './globals.css'
import { CacheProvider } from '@emotion/react';
import { MantineProvider, useEmotionCache } from '@mantine/core';
import { useServerInsertedHTML } from 'next/navigation';
export default function RootStyleRegistry({ children }: { children: React.ReactNode }) {
const cache = useEmotionCache();
cache.compat = true;
useServerInsertedHTML(() => (
<style
data-emotion={`${cache.key} ${Object.keys(cache.inserted).join(' ')}`}
dangerouslySetInnerHTML={{
__html: Object.values(cache.inserted).join(' '),
}}
/>
));
return (
<html lang='en' data-theme="light" >
<body suppressHydrationWarning={true} >
<CacheProvider value={cache}>
<MantineProvider withGlobalStyles withNormalizeCSS>
{children}
</MantineProvider>
</CacheProvider>
</body>
</html>
);
}