cleanup BackupContextMenu.tsx

This commit is contained in:
Matthew Penner 2021-03-12 15:40:45 -07:00
parent 582521f419
commit 5653b03ddb

View File

@ -60,7 +60,7 @@ export default ({ backup }: Props) => {
}); });
}; };
const doRestorationAction = (truncate: boolean) => { const doRestorationAction = () => {
setLoading(true); setLoading(true);
clearFlashes('backups'); clearFlashes('backups');
restoreServerBackup(uuid, backup.uuid, truncate) restoreServerBackup(uuid, backup.uuid, truncate)
@ -88,7 +88,7 @@ export default ({ backup }: Props) => {
visible={modal === 'restore'} visible={modal === 'restore'}
title={'Restore this backup?'} title={'Restore this backup?'}
buttonText={'Restore backup'} buttonText={'Restore backup'}
onConfirmed={() => doRestorationAction(truncate)} onConfirmed={() => doRestorationAction()}
onModalDismissed={() => setModal('')} onModalDismissed={() => setModal('')}
> >
<p css={tw`text-neutral-300`}> <p css={tw`text-neutral-300`}>
@ -110,7 +110,7 @@ export default ({ backup }: Props) => {
id={'restore_truncate'} id={'restore_truncate'}
value={'true'} value={'true'}
checked={truncate} checked={truncate}
onChange={() => setTruncate(!truncate)} onChange={() => setTruncate(s => !s)}
/> />
Remove all files and folders before restoring this backup. Remove all files and folders before restoring this backup.
</label> </label>