diff --git a/src/app/AuthenticatedApp.js b/src/app/AuthenticatedApp.js index 54b24b8..80d66be 100644 --- a/src/app/AuthenticatedApp.js +++ b/src/app/AuthenticatedApp.js @@ -11,15 +11,18 @@ import useLayoutType from '../hooks/useLayoutType'; import Toolbar from '../components/Toolbar'; import Classroom from '../screens/Classroom'; import Assignment from '../screens/Assignment'; +import Profile from '../screens/Profile'; import { avatarMenuOptions, menuOptions } from './data'; -import Profile from '../screens/Profile'; + +import styles from './styles'; function AuthenticatedApp() { const navigate = useNavigate(); const { state } = useUser(); const { logout } = useAuthState(); const layoutType = useLayoutType(); + const { container, toolbar } = styles[layoutType]; return ( state && @@ -27,7 +30,7 @@ function AuthenticatedApp() { <> +

Olá, {state.user.firstName} 👋

} @@ -35,10 +38,7 @@ function AuthenticatedApp() { avatarMenuOptions={avatarMenuOptions(navigate, logout)} user={state.user} /> - + @@ -18,14 +21,4 @@ function UnauthenticatedApp() { ); } -const container = { - height: 'auto', - margin: 0, - padding: 0, - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - backgroundColor: 'primary.mainBackground', -}; - export default UnauthenticatedApp; diff --git a/src/app/styles.js b/src/app/styles.js new file mode 100644 index 0000000..b1ace6f --- /dev/null +++ b/src/app/styles.js @@ -0,0 +1,44 @@ +// ========== Desktop ========= +const desktopContainer = { + height: 'auto', + margin: 0, + padding: 0, + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + backgroundColor: 'primary.mainBackground', +}; + +const desktopToolbar = { + fontSize: '30px', +}; + +const desktop = { + container: desktopContainer, + toolbar: desktopToolbar, +}; + +// ========== Mobile ========= +const mobileContainer = { + ...desktopContainer, + flexDirection: 'column', + justifyContent: 'start', +}; + +const mobileToolbar = { + fontSize: '20px', +}; + +const mobile = { + container: mobileContainer, + toolbar: mobileToolbar, +}; + +// ========== Unset ========= +const unset = { + container: null, + toolbar: null, +}; + +const styles = { desktop, mobile, unset }; +export default styles;