fix: issue delete redirection, chore: code refactor (#1521)

This commit is contained in:
Anmol Singh Bhatia 2023-07-13 19:00:43 +05:30 committed by GitHub
parent 60e96bcb72
commit 7361657660
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 24 deletions

View file

@ -39,13 +39,11 @@ export const AutoArchiveAutomation: React.FC<Props> = ({ projectDetails, handleC
</div>
<ToggleSwitch
value={projectDetails?.archive_in !== 0}
onChange={() => {
if (projectDetails?.archive_in === 0) {
handleChange({ archive_in: 1 });
} else {
handleChange({ archive_in: 0 });
}
}}
onChange={() =>
projectDetails?.archive_in === 0
? handleChange({ archive_in: 1 })
: handleChange({ archive_in: 0 })
}
size="sm"
/>
</div>