Skip to content

Commit

Permalink
fix: clause menu spinner position and title sticky
Browse files Browse the repository at this point in the history
  • Loading branch information
ledouxm committed Jan 10, 2025
1 parent 50d0d42 commit bfc5811
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion packages/frontend/src/features/menu/ClauseMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ export const ClauseMenu = ({ isNational, ...props }: { isNational: boolean } & M
.selectAll(),
);

if (clausesQuery.isLoading) return <Spinner />;
if (clausesQuery.isLoading)
return (
<styled.div h="100%">
<Spinner />
</styled.div>
);

if (isNational)
return (
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/src/features/menu/MenuButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ export const MenuButton = () => {
};

const modalContents: Record<MenuStates, (props: ModalContentProps) => ReactNode> = {
main: (props) => <MenuActions />,
help: (props) => <HelpMenu />,
main: (_props) => <MenuActions />,
help: (_props) => <HelpMenu />,
clausesDepartementales: (props) => <ClauseMenu isNational={false} {...props} />,
clausesNationales: (props) => <ClauseMenu isNational {...props} />,
share: (props) => <ShareReport {...props} />,
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/src/features/menu/MenuTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const MenuTitle = ({
<>
<Flex
zIndex="5"
position={{ base: "sticky", lg: "unset" }}
top={{ base: "-1px", lg: "unset" }}
position={{ base: "sticky", lg: "sticky" }}
top={{ base: "0", lg: "0" }}
justifyContent="space-between"
alignItems="center"
w="100%"
Expand Down

0 comments on commit bfc5811

Please sign in to comment.