fix: allow users to disable any active cloud integration even if they are not entitled to cloud backups (#870)
* fix: allow users to disable any active cloud integration even if they are not entitled to cloud backups * chore: better variable naming * refactor: move css constant away from the global constants file * refactor: avoid importing a constant css class from non-shared file
This commit is contained in:
@@ -34,7 +34,7 @@ export const EmailBackups = observer(({ application }: Props) => {
|
||||
>([]);
|
||||
const [isFailedBackupEmailMuted, setIsFailedBackupEmailMuted] =
|
||||
useState(true);
|
||||
const [isEntitledForEmailBackups, setIsEntitledForEmailBackups] =
|
||||
const [isEntitledToEmailBackups, setIsEntitledToEmailBackups] =
|
||||
useState(false);
|
||||
|
||||
const loadEmailFrequencySetting = useCallback(async () => {
|
||||
@@ -65,7 +65,7 @@ export const EmailBackups = observer(({ application }: Props) => {
|
||||
const emailBackupsFeatureStatus = application.getFeatureStatus(
|
||||
FeatureIdentifier.DailyEmailBackup
|
||||
);
|
||||
setIsEntitledForEmailBackups(
|
||||
setIsEntitledToEmailBackups(
|
||||
emailBackupsFeatureStatus === FeatureStatus.Entitled
|
||||
);
|
||||
|
||||
@@ -126,7 +126,7 @@ export const EmailBackups = observer(({ application }: Props) => {
|
||||
<PreferencesGroup>
|
||||
<PreferencesSegment>
|
||||
<Title>Email Backups</Title>
|
||||
{!isEntitledForEmailBackups && (
|
||||
{!isEntitledToEmailBackups && (
|
||||
<>
|
||||
<Text>
|
||||
A <span className={'font-bold'}>Plus</span> or{' '}
|
||||
@@ -142,7 +142,7 @@ export const EmailBackups = observer(({ application }: Props) => {
|
||||
)}
|
||||
<div
|
||||
className={
|
||||
isEntitledForEmailBackups
|
||||
isEntitledToEmailBackups
|
||||
? ''
|
||||
: 'faded cursor-default pointer-events-none'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user