import { StyleProvider } from '@ant-design/cssinjs';
import { ConfigProvider, theme, App as AntdApp } from 'antd';
// import 'dayjs/locale/zh-cn';
import zhCN from 'antd/locale/zh_CN';

import { FC } from 'react';

import $styles from './app.module.css';
import { CallbackDemo } from './components/demo/callback';
import EffectDemo from './components/demo/effect';
import MemoDemo from './components/demo/memo';
import RefDemo from './components/demo/ref';
import StateDemo from './components/demo/state';

const App: FC = () => {
    return (
        <ConfigProvider
            locale={zhCN}
            theme={{
                algorithm: theme.defaultAlgorithm,
                token: {},
            }}
        >
            <StyleProvider hashPriority="high">
                <AntdApp>
                    <div className={$styles.app}>
                        <StateDemo />
                        <EffectDemo />
                        <RefDemo />
                        <MemoDemo />
                        <CallbackDemo />
                    </div>
                </AntdApp>
            </StyleProvider>
        </ConfigProvider>
    );
};
export default App;
