mirror of
https://github.com/RoboSats/robosats.git
synced 2025-02-22 21:29:06 +00:00
Fix order tab navigation
This commit is contained in:
parent
e885585472
commit
42591b34e5
@ -21,17 +21,8 @@ import { GarageContext, type UseGarageStoreType } from '../../contexts/GarageCon
|
|||||||
const NavBar = (): JSX.Element => {
|
const NavBar = (): JSX.Element => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const {
|
const { page, setPage, settings, setSlideDirection, open, setOpen, windowSize, navbarHeight } =
|
||||||
page,
|
useContext<UseAppStoreType>(AppContext);
|
||||||
setPage,
|
|
||||||
settings,
|
|
||||||
setSlideDirection,
|
|
||||||
open,
|
|
||||||
setOpen,
|
|
||||||
windowSize,
|
|
||||||
navbarHeight,
|
|
||||||
hostUrl,
|
|
||||||
} = useContext<UseAppStoreType>(AppContext);
|
|
||||||
const { garage, orderUpdatedAt, robotUpdatedAt } = useContext<UseGarageStoreType>(GarageContext);
|
const { garage, orderUpdatedAt, robotUpdatedAt } = useContext<UseGarageStoreType>(GarageContext);
|
||||||
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@ -62,6 +53,9 @@ const NavBar = (): JSX.Element => {
|
|||||||
navigate('/robot');
|
navigate('/robot');
|
||||||
setPage('robot');
|
setPage('robot');
|
||||||
}
|
}
|
||||||
|
if (isPage(pathPage) && pathPage.includes('order')) {
|
||||||
|
setPage(pathPage);
|
||||||
|
}
|
||||||
}, [location, navigate, setPage, orderUpdatedAt, robotUpdatedAt]);
|
}, [location, navigate, setPage, orderUpdatedAt, robotUpdatedAt]);
|
||||||
|
|
||||||
const handleSlideDirection = function (oldPage: Page, newPage: Page): void {
|
const handleSlideDirection = function (oldPage: Page, newPage: Page): void {
|
||||||
|
Loading…
Reference in New Issue
Block a user