Web:Client:Settings: fix useless scroll for free user
This commit is contained in:
parent
de38d6da97
commit
7479a459f4
@ -30,6 +30,8 @@ const PersonalSettings = ({
|
||||
showTitle,
|
||||
createWithoutDialog,
|
||||
setCreateWithoutDialog,
|
||||
|
||||
showAdminSettings,
|
||||
}) => {
|
||||
const [isLoadingFavorites, setIsLoadingFavorites] = React.useState(false);
|
||||
const [isLoadingRecent, setIsLoadingRecent] = React.useState(false);
|
||||
@ -75,7 +77,10 @@ const PersonalSettings = ({
|
||||
};
|
||||
|
||||
return (
|
||||
<StyledSettings showTitle={showTitle}>
|
||||
<StyledSettings
|
||||
showTitle={showTitle}
|
||||
hideAdminSettings={!showAdminSettings}
|
||||
>
|
||||
<Box className="settings-section">
|
||||
{showTitle && (
|
||||
<Heading className="heading" level={2} size="xsmall">
|
||||
|
@ -3,10 +3,22 @@ import { tablet } from "@docspace/components/utils/device";
|
||||
import { isMobile } from "react-device-detect";
|
||||
|
||||
const StyledSettings = styled.div`
|
||||
margin-top: ${(props) => (props.showTitle ? 24 : 34)}px;
|
||||
margin-top: ${(props) =>
|
||||
props.hideAdminSettings ? 22 : props.showTitle ? 24 : 34}px;
|
||||
|
||||
${(props) =>
|
||||
props.hideAdminSettings &&
|
||||
css`
|
||||
padding-top: 2px;
|
||||
`}
|
||||
|
||||
@media ${tablet} {
|
||||
margin-top: 8px;
|
||||
margin-top: ${(props) => (props.hideAdminSettings ? 0 : 8)}px;
|
||||
${(props) =>
|
||||
props.hideAdminSettings &&
|
||||
css`
|
||||
padding-top: 8px;
|
||||
`}
|
||||
}
|
||||
|
||||
${isMobile &&
|
||||
|
@ -70,7 +70,11 @@ const SectionBodyContent = ({ isErrorSettings, history, user }) => {
|
||||
) : (
|
||||
<StyledContainer>
|
||||
{!showAdminSettings ? (
|
||||
<PersonalSettings t={t} showTitle={true} />
|
||||
<PersonalSettings
|
||||
t={t}
|
||||
showTitle={true}
|
||||
showAdminSettings={showAdminSettings}
|
||||
/>
|
||||
) : (
|
||||
<Submenu
|
||||
data={data}
|
||||
|
Loading…
Reference in New Issue
Block a user