CI: add TS indentation check via esLint (#24810)
This commit is contained in:
parent
414ee51975
commit
208ce4e774
118 changed files with 457 additions and 489 deletions
|
|
@ -99,28 +99,28 @@ const useEducationReverifyNotice = ({
|
|||
if (isLoading || !timezone)
|
||||
return
|
||||
if (allowRefreshEducationVerify) {
|
||||
const expired = isExpired(educationAccountExpireAt!, timezone)
|
||||
const isExpireAtChanged = prevExpireAt !== educationAccountExpireAt
|
||||
if (isExpireAtChanged) {
|
||||
setPrevExpireAt(educationAccountExpireAt!)
|
||||
setReverifyHasNoticed(false)
|
||||
setExpiredHasNoticed(false)
|
||||
}
|
||||
const shouldNotice = (() => {
|
||||
if (isExpireAtChanged)
|
||||
return true
|
||||
return expired ? !expiredHasNoticed : !reverifyHasNoticed
|
||||
})()
|
||||
if (shouldNotice) {
|
||||
onNotice({
|
||||
expireAt: educationAccountExpireAt!,
|
||||
expired,
|
||||
})
|
||||
if (expired)
|
||||
setExpiredHasNoticed(true)
|
||||
else
|
||||
setReverifyHasNoticed(true)
|
||||
}
|
||||
const expired = isExpired(educationAccountExpireAt!, timezone)
|
||||
const isExpireAtChanged = prevExpireAt !== educationAccountExpireAt
|
||||
if (isExpireAtChanged) {
|
||||
setPrevExpireAt(educationAccountExpireAt!)
|
||||
setReverifyHasNoticed(false)
|
||||
setExpiredHasNoticed(false)
|
||||
}
|
||||
const shouldNotice = (() => {
|
||||
if (isExpireAtChanged)
|
||||
return true
|
||||
return expired ? !expiredHasNoticed : !reverifyHasNoticed
|
||||
})()
|
||||
if (shouldNotice) {
|
||||
onNotice({
|
||||
expireAt: educationAccountExpireAt!,
|
||||
expired,
|
||||
})
|
||||
if (expired)
|
||||
setExpiredHasNoticed(true)
|
||||
else
|
||||
setReverifyHasNoticed(true)
|
||||
}
|
||||
}
|
||||
}, [allowRefreshEducationVerify, timezone])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue