From d5d79a1eda22d17bdeb50643c6b2893a345897fe Mon Sep 17 00:00:00 2001 From: ashu130698 Date: Fri, 3 Apr 2026 23:41:17 +0530 Subject: [PATCH] fix(ux): replace buggy margin-based centering with reliable flexbox wrapper to permanently center floating action bars --- .../Components/common/FloatingActionBar.tsx | 82 ++++++++++--------- 1 file changed, 45 insertions(+), 37 deletions(-) diff --git a/client/src/Components/common/FloatingActionBar.tsx b/client/src/Components/common/FloatingActionBar.tsx index 3018b68e8..32a8593aa 100644 --- a/client/src/Components/common/FloatingActionBar.tsx +++ b/client/src/Components/common/FloatingActionBar.tsx @@ -2,6 +2,7 @@ import React from "react"; import { useTranslation } from "react-i18next"; import { useTheme } from "@mui/material/styles"; import Paper from "@mui/material/Paper"; +import Box from "@mui/material/Box"; import Stack from "@mui/material/Stack"; import Typography from "@mui/material/Typography"; import IconButton from "@mui/material/IconButton"; @@ -31,58 +32,65 @@ export const FloatingActionBar: React.FC = ({ mountOnEnter unmountOnExit > - - - - {selectedCount} {t("common.selected")} - - - - - - - {children && ( - {children} + + {selectedCount} {t("common.selected")} + + + + - )} - + + {children && ( + + {children} + + )} + + ); };