Update delete user to handle superadmin case

This commit is contained in:
Alex Holliday
2024-09-26 11:50:50 +08:00
parent 5ec032466b
commit edd9b5a6aa
4 changed files with 51 additions and 15 deletions

View File

@@ -33,7 +33,7 @@ const Settings = ({ isAdmin }) => {
const { timezone } = useSelector((state) => state.ui);
const [checksIsLoading, setChecksIsLoading] = useState(false);
const [form, setForm] = useState({
ttl: (checkTTL / SECONDS_PER_DAY).toString(),
ttl: checkTTL ? (checkTTL / SECONDS_PER_DAY).toString() : 0,
});
const [errors, setErrors] = useState({});
const dispatch = useDispatch();