Fix no-non-null-assertion lint error in PrivacySection
Replace non-null assertion with optional chaining on dataRequestCooldownUntil to satisfy oxlint no-non-null-assertion rule. https://claude.ai/code/session_017Hvmof82Xr3UwKFc3pnC4X
This commit is contained in:
parent
f462d0f0c7
commit
f92bc9e549
1 changed files with 2 additions and 2 deletions
|
|
@ -35,7 +35,7 @@ export function PrivacySection({
|
|||
if (!open) setConfirmed(false);
|
||||
};
|
||||
|
||||
const inCooldown = dataRequestCooldownUntil != null && dataRequestCooldownUntil > new Date();
|
||||
const inCooldown = dataRequestCooldownUntil !== null && dataRequestCooldownUntil > new Date();
|
||||
|
||||
return (
|
||||
<div className="space-y-8">
|
||||
|
|
@ -69,7 +69,7 @@ export function PrivacySection({
|
|||
{inCooldown && !dataRequestSuccess && (
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Your data request is being processed. You can submit another request
|
||||
after {dataRequestCooldownUntil!.toLocaleDateString()}.
|
||||
after {dataRequestCooldownUntil?.toLocaleDateString()}.
|
||||
</p>
|
||||
)}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue