Skip to content

Commit

Permalink
Bug where widget included app header (#2314)
Browse files Browse the repository at this point in the history
  • Loading branch information
entrotech authored Jan 4, 2025
1 parent ff849d1 commit 1c2c82b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion client/src/Routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import { Navigate, Outlet, Route, Routes } from "react-router-dom";
import Fallback from "./components/Fallback";
import PrivateRoute from "./components/PrivateRoute";
import Toast from "components/UI/Toast";
import {
useWidget,
} from "./appReducer";

const VerificationAdmin = lazy(() =>
import("components/Admin/VerificationAdmin")
Expand Down Expand Up @@ -196,6 +199,7 @@ export default function AppRoutes() {
}

function AppWrapper() {
const isWidget = useWidget();
return (
<Grid
container
Expand All @@ -211,7 +215,7 @@ function AppWrapper() {
overflowX: "hidden",
}}
>
<Header />
{isWidget ? null : <Header />}
<Outlet />
<Toast />
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import {
useFilterPanel,
useListPanel,
useAppDispatch,
useWidget
} from "../../../../appReducer";
import DrawerLeftArrowButton from "../../../../icons/DrawerLeftArrowButton";
import DrawerRightArrowButton from "../../../../icons/DrawerRightArrowButton";

const DesktopLayout = ({ filters, list, map }) => {
const isFilterPanelOpen = useFilterPanel();
const isListPanelOpen = useListPanel();
const isWidget = useWidget();
const dispatch = useAppDispatch();

const toggleDrawer = (event) => {
Expand Down Expand Up @@ -51,7 +53,7 @@ const DesktopLayout = ({ filters, list, map }) => {
width: "524px",
transition: "left .5s ease-in-out",
left: isListPanelOpen ? leftPostion : "-524px",
top: "120px",
top: isWidget ? "62px": "126px",
height: "calc(100% - 120px)",
zIndex: 3,
background: "white",
Expand Down

0 comments on commit 1c2c82b

Please sign in to comment.