Merged in feature/IO-3604-Tech-Job-Drawer (pull request #3098)
IO-3604 Tech Job Drawer
This commit is contained in:
@@ -25,10 +25,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
});
|
||||
|
||||
export function TechLookupJobsDrawer({ bodyshop, setPrintCenterContext }) {
|
||||
const breakpoints = Grid.useBreakpoint();
|
||||
const selectedBreakpoint = Object.entries(breakpoints)
|
||||
.filter(([, isOn]) => !!isOn)
|
||||
.slice(-1)[0];
|
||||
const screens = Grid.useBreakpoint();
|
||||
|
||||
const bpoints = {
|
||||
xs: "100%",
|
||||
@@ -36,10 +33,16 @@ export function TechLookupJobsDrawer({ bodyshop, setPrintCenterContext }) {
|
||||
md: "100%",
|
||||
lg: "100%",
|
||||
xl: "90%",
|
||||
xxl: "85%"
|
||||
xxl: "90%"
|
||||
};
|
||||
|
||||
const drawerPercentage = selectedBreakpoint ? bpoints[selectedBreakpoint[0]] : "100%";
|
||||
let drawerPercentage = "100%";
|
||||
if (screens.xxl) drawerPercentage = bpoints.xxl;
|
||||
else if (screens.xl) drawerPercentage = bpoints.xl;
|
||||
else if (screens.lg) drawerPercentage = bpoints.lg;
|
||||
else if (screens.md) drawerPercentage = bpoints.md;
|
||||
else if (screens.sm) drawerPercentage = bpoints.sm;
|
||||
else if (screens.xs) drawerPercentage = bpoints.xs;
|
||||
|
||||
const location = useLocation();
|
||||
const history = useNavigate();
|
||||
|
||||
Reference in New Issue
Block a user