Files
twenty/front/src/layout/AppLayout.tsx
Charles Bochet bc49815ff0 Make all fields optional on entities (#121)
* Make all fields optional on entities

* Rewrite tests

* Add test on TableHeader Cancel button
2023-05-17 14:50:49 +02:00

38 lines
851 B
TypeScript

import Navbar from './navbar/Navbar';
import styled from '@emotion/styled';
import { ThemeProvider } from '@emotion/react';
import { User } from '../interfaces/user.interface';
import { lightTheme } from './styles/themes';
const StyledLayout = styled.div`
display: flex;
flex-direction: row;
width: 100vw;
height: 100vh;
`;
const StyledRightContainer = styled.div`
display: flex;
flex-direction: row;
flex: 1;
overflow: hidden;
`;
type OwnProps = {
children: JSX.Element;
user?: User;
};
function AppLayout({ children, user }: OwnProps) {
return (
<ThemeProvider theme={lightTheme}>
<StyledLayout>
<Navbar user={user} workspace={user?.workspaceMember?.workspace} />
<StyledRightContainer>{children}</StyledRightContainer>
</StyledLayout>
</ThemeProvider>
);
}
export default AppLayout;