init
This commit is contained in:
44
worklenz-frontend/src/layouts/AuthLayout.tsx
Normal file
44
worklenz-frontend/src/layouts/AuthLayout.tsx
Normal file
@@ -0,0 +1,44 @@
|
||||
import { ConfigProvider, Flex, Layout } from 'antd';
|
||||
import React from 'react';
|
||||
import { Outlet } from 'react-router-dom';
|
||||
import { useAppSelector } from '../hooks/useAppSelector';
|
||||
import { colors } from '../styles/colors';
|
||||
|
||||
const AuthLayout = () => {
|
||||
const themeMode = useAppSelector(state => state.themeReducer.mode);
|
||||
|
||||
return (
|
||||
<ConfigProvider
|
||||
theme={{
|
||||
components: {
|
||||
Layout: {
|
||||
colorBgLayout: themeMode === 'dark' ? colors.darkGray : '#fafafa',
|
||||
},
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Layout
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
minHeight: '100vh',
|
||||
width: '100%',
|
||||
}}
|
||||
>
|
||||
<Flex
|
||||
style={{
|
||||
marginBlockStart: 96,
|
||||
marginBlockEnd: 48,
|
||||
marginInline: 24,
|
||||
width: '90%',
|
||||
maxWidth: 440,
|
||||
}}
|
||||
>
|
||||
<Outlet />
|
||||
</Flex>
|
||||
</Layout>
|
||||
</ConfigProvider>
|
||||
);
|
||||
};
|
||||
|
||||
export default AuthLayout;
|
||||
Reference in New Issue
Block a user