From 9cad49758e2b8c76d988398c92cb1365375e612f Mon Sep 17 00:00:00 2001 From: Ioana Tatu Date: Thu, 18 Nov 2021 15:32:11 +0100 Subject: [PATCH 1/2] fix mui navbar default scrolling behavior --- frontend/src/app/ui/siteLayout/NavigationBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/ui/siteLayout/NavigationBar.tsx b/frontend/src/app/ui/siteLayout/NavigationBar.tsx index 3d731d2..f82fa22 100644 --- a/frontend/src/app/ui/siteLayout/NavigationBar.tsx +++ b/frontend/src/app/ui/siteLayout/NavigationBar.tsx @@ -99,7 +99,7 @@ const AvatarContainer = styled("div")({ }); export const NavigationBar: React.FC = ({ user }) => ( - + futuLog From 6e9aa3a8fd2587cec31aa8b6c639cafeba1f36cc Mon Sep 17 00:00:00 2001 From: Ioana Tatu Date: Thu, 18 Nov 2021 17:15:22 +0100 Subject: [PATCH 2/2] fix: add navbar height as top margin for components --- frontend/src/app/ui/homePage/HomePage.tsx | 4 +++- frontend/src/app/ui/planningPage/PlanningPage.tsx | 2 +- frontend/src/app/ui/userPage/UserPage.tsx | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/ui/homePage/HomePage.tsx b/frontend/src/app/ui/homePage/HomePage.tsx index 35ac9de..9c54073 100644 --- a/frontend/src/app/ui/homePage/HomePage.tsx +++ b/frontend/src/app/ui/homePage/HomePage.tsx @@ -24,7 +24,8 @@ import { H2, H3, P } from "app/ui/ux/text"; import { IconInfo, IconCheck } from "app/ui/ux/icons"; import { Stack, HR } from "app/ui/ux/containers"; import { WorkmodeButtons } from "app/ui/homePage/WorkmodeButtons"; -import { Card } from "app/ui/ux/Card" +import { Card } from "app/ui/ux/Card"; +import { NAVIGATION_BAR_HEIGHT_PX } from "app/ui/siteLayout/NavigationBar"; const InlineIconButton = styled(IconButton)({ @@ -102,6 +103,7 @@ export const HomePage: React.FC = () => { mx="auto" p={["0.5rem", "1rem", "2.5rem"]} spacing={["0.5rem", "1rem", "2.5rem"]} + marginTop={`${NAVIGATION_BAR_HEIGHT_PX}px`} > { const [month, setMonth] = useState(dayjs().format("MMMM YYYY")); return ( - + {/* Heading element */}
diff --git a/frontend/src/app/ui/userPage/UserPage.tsx b/frontend/src/app/ui/userPage/UserPage.tsx index 582dd61..573f5f7 100644 --- a/frontend/src/app/ui/userPage/UserPage.tsx +++ b/frontend/src/app/ui/userPage/UserPage.tsx @@ -9,6 +9,7 @@ import { userQueryKey, setDefaultOfficeQueryKey } from "app/utils/reactQueryUtil import { useMutation } from "react-query"; import { SiteSelector } from "../siteSelector/SiteSector"; import { Button } from "../ux/buttons"; +import { NAVIGATION_BAR_HEIGHT_PX } from "app/ui/siteLayout/NavigationBar"; export const UserPage: React.FC = () => { const { apiClient, queryCache } = useServices(); @@ -34,7 +35,7 @@ export const UserPage: React.FC = () => { }; return ( - +

Personal page