import { DevTool } from '@/layouts/components/dev-tool'
import { useLayout } from '@/layouts/hooks/use-layout'
import { ConfigProvider } from 'antd'
import zhCN from 'antd/es/locale/zh_CN'
import { memo } from 'react'

const Layout = memo(({ children }) => {
  const { show } = useLayout()

  return (
    <ConfigProvider locale={zhCN}>
      {show ? children : null}
      <DevTool />
    </ConfigProvider>
  )
})

export default Layout
