Web:People:Home: remove mobile main button from empty screen on desktop devices
This commit is contained in:
parent
1a386a8adf
commit
7a97d482f0
@ -10,6 +10,12 @@ import { inject, observer } from "mobx-react";
|
|||||||
import { CatalogMainButtonContent } from "../../../../components/Catalog";
|
import { CatalogMainButtonContent } from "../../../../components/Catalog";
|
||||||
import { Consumer } from "@appserver/components/utils/context";
|
import { Consumer } from "@appserver/components/utils/context";
|
||||||
|
|
||||||
|
import { isMobile } from "react-device-detect";
|
||||||
|
import {
|
||||||
|
isMobile as isMobileUtils,
|
||||||
|
isTablet as isTabletUtils,
|
||||||
|
} from "@appserver/components/utils/device";
|
||||||
|
|
||||||
const EmptyScreen = ({ resetFilter, isEmptyGroup, setIsLoading }) => {
|
const EmptyScreen = ({ resetFilter, isEmptyGroup, setIsLoading }) => {
|
||||||
const { t } = useTranslation(["Home", "Common"]);
|
const { t } = useTranslation(["Home", "Common"]);
|
||||||
|
|
||||||
@ -62,11 +68,15 @@ const EmptyScreen = ({ resetFilter, isEmptyGroup, setIsLoading }) => {
|
|||||||
</Grid>
|
</Grid>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Consumer>
|
{isMobile || isMobileUtils() || isTabletUtils() ? (
|
||||||
{(context) => (
|
<Consumer>
|
||||||
<CatalogMainButtonContent sectionWidth={context.sectionWidth} />
|
{(context) => (
|
||||||
)}
|
<CatalogMainButtonContent sectionWidth={context.sectionWidth} />
|
||||||
</Consumer>
|
)}
|
||||||
|
</Consumer>
|
||||||
|
) : (
|
||||||
|
<></>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user