From 92ed07db23226d46494984fd139430a9e5c74fef Mon Sep 17 00:00:00 2001 From: Timofey Date: Tue, 8 Feb 2022 17:21:36 +0800 Subject: [PATCH] Web:People: disable catalog main button in section for desktop view --- .../Client/src/pages/Home/Section/Body/index.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/products/ASC.People/Client/src/pages/Home/Section/Body/index.js b/products/ASC.People/Client/src/pages/Home/Section/Body/index.js index 800a33752b..7ca1a82398 100644 --- a/products/ASC.People/Client/src/pages/Home/Section/Body/index.js +++ b/products/ASC.People/Client/src/pages/Home/Section/Body/index.js @@ -7,6 +7,11 @@ import PeopleRowContainer from "./RowView/PeopleRowContainer"; import TableView from "./TableView/TableContainer"; import { Consumer } from "@appserver/components/utils/context"; import { CatalogMainButtonContent } from "../../../../components/Catalog"; +import { isMobile } from "react-device-detect"; +import { + isMobile as isMobileUtils, + isTablet as isTabletUtils, +} from "@appserver/components/utils/device"; class SectionBodyContent extends React.Component { render() { @@ -18,7 +23,9 @@ class SectionBodyContent extends React.Component { viewAs === "table" ? ( <> - + {(isMobile || isMobileUtils() || isTabletUtils()) && ( + + )} ) : ( <> @@ -26,7 +33,9 @@ class SectionBodyContent extends React.Component { sectionWidth={context.sectionWidth} tReady={tReady} /> - + {(isMobile || isMobileUtils() || isTabletUtils()) && ( + + )} ) }