Files
worklenz/worklenz-frontend/src/layouts/AuthLayout.tsx
chamikaJ 8825b0410a init
2025-04-17 18:28:54 +05:30

45 lines
1009 B
TypeScript

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;