diff --git a/src/PrerenderProduct.js b/src/PrerenderProduct.js index 11f7b28..0ef0fa2 100644 --- a/src/PrerenderProduct.js +++ b/src/PrerenderProduct.js @@ -165,16 +165,15 @@ class PrerenderProduct extends React.Component { sx: { mb: 2, position: ["-webkit-sticky", "sticky"], + // No CategoryList in prerender — two-row toolbar only; safe-area for notched phones. top: { - xs: "80px", + xs: "calc(env(safe-area-inset-top, 0px) + 128px)", sm: "80px", - md: "80px", - lg: "80px", }, left: 0, width: "100%", display: "flex", - zIndex: 999, // Just below the AppBar + zIndex: (theme) => theme.zIndex.appBar - 1, py: 0, px: 2, } diff --git a/src/components/Content.js b/src/components/Content.js index 6d38d8d..ce10053 100644 --- a/src/components/Content.js +++ b/src/components/Content.js @@ -701,7 +701,7 @@ class Content extends Component { minHeight: { xs: 'min-content', sm: '100%' } }}> - + - theme.zIndex.appBar - 1 /* Just below the AppBar */, + zIndex: (theme) => theme.zIndex.appBar - 1, py: 0, px: 2, }} @@ -1200,10 +1199,19 @@ class ProductDetailPage extends Component { borderRadius: 1, }} > - + this.props.navigate(-1)} + onClick={(e) => { + e.preventDefault(); + if (this.props.navigate) { + if (typeof window !== "undefined" && window.history.length > 1) { + this.props.navigate(-1); + } else { + this.props.navigate("/"); + } + } + }} style={{ paddingLeft: 16, paddingRight: 16, diff --git a/src/components/ProductFilters.js b/src/components/ProductFilters.js index d928365..6578c71 100644 --- a/src/components/ProductFilters.js +++ b/src/components/ProductFilters.js @@ -1,4 +1,5 @@ import React, { Component } from 'react'; +import Box from '@mui/material/Box'; import Paper from '@mui/material/Paper'; import Typography from '@mui/material/Typography'; import Filter from './Filter.js'; @@ -201,19 +202,31 @@ class ProductFilters extends Component { render() { return ( + @@ -295,6 +308,7 @@ class ProductFilters extends Component { /> )} + ); } }