Provide age-restricted viewers the option to delete their account (#10041)

This commit is contained in:
DS Boyce
2026-03-12 11:13:23 -07:00
committed by GitHub
parent 4737bfb7ed
commit 7b5d5a4f76
3 changed files with 36 additions and 4 deletions
+2 -1
View File
@@ -43,6 +43,7 @@ export function useIsBirthdateUpdateAllowed() {
])
if (!lastUpdated) return true
const lastUpdatedDate = new Date(lastUpdated)
// eslint-disable-next-line react-hooks/purity
const diffMs = Date.now() - lastUpdatedDate.getTime()
const diffHours = diffMs / (1000 * 60 * 60)
return diffHours >= BIRTHDATE_DELAY_HOURS
@@ -66,7 +67,7 @@ export function useBirthdateMutation() {
* Also patch the age assurance other required data with the new
* birthdate, which may change the user's age assurance access level.
*/
patchOtherRequiredData({birthdate: bday})
void patchOtherRequiredData({birthdate: bday})
snoozeBirthdateUpdateAllowedForDid(agent.sessionManager.did!)
},
})