Skip to content

Commit 11a3d81

Browse files
committed
MP-84 fix space settings section without items
1 parent cc7b2ab commit 11a3d81

File tree

6 files changed

+18
-3
lines changed

6 files changed

+18
-3
lines changed

src/apps/accounts/src/settings/tabs/tools/service-provider/ServiceProvider.module.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
grid-template-columns: 1fr 1fr;
4242
margin: $sp-13 0 $sp-4;
4343

44+
&.formNoTop {
45+
margin-top: 0;
46+
}
47+
4448
.formCTAs {
4549
display: flex;
4650
align-items: center;

src/apps/accounts/src/settings/tabs/tools/service-provider/ServiceProvider.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Dispatch, FC, MutableRefObject, SetStateAction, useEffect, useRef, useState } from 'react'
22
import { bind, isEmpty, reject, trim } from 'lodash'
33
import { toast } from 'react-toastify'
4+
import classNames from 'classnames'
45

56
import { updateMemberTraitsAsync, UserProfile, UserTrait } from '~/libs/core'
67
import { Button, Collapsible, ConfirmModal, IconOutline, InputSelect, InputText } from '~/libs/ui'
@@ -288,7 +289,7 @@ const ServiceProvider: FC<ServiceProviderProps> = (props: ServiceProviderProps)
288289

289290
<form
290291
ref={formElRef}
291-
className={styles.formWrap}
292+
className={classNames(styles.formWrap, !serviceProviderTypesData?.length ? styles.formNoTop : '')}
292293
>
293294
<p>Add a new service provider</p>
294295
<div className={styles.form}>

src/apps/accounts/src/settings/tabs/tools/software/Software.module.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
grid-template-columns: 1fr 1fr;
4242
margin: $sp-13 0 $sp-4;
4343

44+
&.formNoTop {
45+
margin-top: 0;
46+
}
47+
4448
.formCTAs {
4549
display: flex;
4650
align-items: center;

src/apps/accounts/src/settings/tabs/tools/software/Software.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Dispatch, FC, MutableRefObject, SetStateAction, useEffect, useRef, useState } from 'react'
22
import { bind, isEmpty, reject, trim } from 'lodash'
33
import { toast } from 'react-toastify'
4+
import classNames from 'classnames'
45

56
import { updateMemberTraitsAsync, UserProfile, UserTrait } from '~/libs/core'
67
import { Button, Collapsible, ConfirmModal, IconOutline, InputSelect, InputText } from '~/libs/ui'
@@ -267,7 +268,7 @@ const Software: FC<SoftwareProps> = (props: SoftwareProps) => {
267268

268269
<form
269270
ref={formElRef}
270-
className={styles.formWrap}
271+
className={classNames(styles.formWrap, !softwareTypesData?.length ? styles.formNoTop : '')}
271272
>
272273
<p>Add a new software</p>
273274
<div className={styles.form}>

src/apps/accounts/src/settings/tabs/tools/subscriptions/Subscriptions.module.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
grid-template-columns: 1fr 1fr;
4242
margin: $sp-13 0 $sp-4;
4343

44+
&.formNoTop {
45+
margin-top: 0;
46+
}
47+
4448
.formCTAs {
4549
display: flex;
4650
align-items: center;

src/apps/accounts/src/settings/tabs/tools/subscriptions/Subscriptions.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Dispatch, FC, MutableRefObject, SetStateAction, useEffect, useRef, useState } from 'react'
22
import { bind, isEmpty, reject, trim } from 'lodash'
33
import { toast } from 'react-toastify'
4+
import classNames from 'classnames'
45

56
import { updateMemberTraitsAsync, UserProfile, UserTrait } from '~/libs/core'
67
import { Button, Collapsible, ConfirmModal, IconOutline, InputText } from '~/libs/ui'
@@ -251,7 +252,7 @@ const Subscriptions: FC<SubscriptionsProps> = (props: SubscriptionsProps) => {
251252

252253
<form
253254
ref={formElRef}
254-
className={styles.formWrap}
255+
className={classNames(styles.formWrap, !subscriptionsTypesData?.length ? styles.formNoTop : '')}
255256
>
256257
<p>Add a new subscription</p>
257258
<div className={styles.form}>

0 commit comments

Comments
 (0)