More flag cleanup
This commit is contained in:
@@ -71,7 +71,7 @@ export function NoAccessScreen() {
|
|||||||
const aa = useAgeAssurance()
|
const aa = useAgeAssurance()
|
||||||
const isBlocked = aa.state.status === aa.Status.Blocked
|
const isBlocked = aa.state.status === aa.Status.Blocked
|
||||||
const isAARegion = !!region
|
const isAARegion = !!region
|
||||||
const hasDeclaredAge = metadata?.declaredAge !== undefined
|
const hasDeclaredAge = aa.flags.hasDeclaredAge
|
||||||
const canUpdateBirthday =
|
const canUpdateBirthday =
|
||||||
isBirthdateUpdateAllowed || isLegacyBirthdateBug(metadata?.birthdate || '')
|
isBirthdateUpdateAllowed || isLegacyBirthdateBug(metadata?.birthdate || '')
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ const AgeAssuranceStateContext = createContext<{
|
|||||||
adultContentDisabled: false,
|
adultContentDisabled: false,
|
||||||
chatDisabled: false,
|
chatDisabled: false,
|
||||||
groupChatDisabled: false,
|
groupChatDisabled: false,
|
||||||
|
hasDeclaredAge: false,
|
||||||
isDeclaredUnderAdultAge: false,
|
isDeclaredUnderAdultAge: false,
|
||||||
isOverRegionMinAccessAge: false,
|
isOverRegionMinAccessAge: false,
|
||||||
isOverAppMinAccessAge: false,
|
isOverAppMinAccessAge: false,
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ export type AgeAssuranceFlags = {
|
|||||||
adultContentDisabled: boolean
|
adultContentDisabled: boolean
|
||||||
chatDisabled: boolean
|
chatDisabled: boolean
|
||||||
groupChatDisabled: boolean
|
groupChatDisabled: boolean
|
||||||
|
hasDeclaredAge: boolean
|
||||||
isDeclaredUnderAdultAge: boolean
|
isDeclaredUnderAdultAge: boolean
|
||||||
isOverRegionMinAccessAge: boolean
|
isOverRegionMinAccessAge: boolean
|
||||||
isOverAppMinAccessAge: boolean
|
isOverAppMinAccessAge: boolean
|
||||||
|
|||||||
@@ -199,6 +199,7 @@ export function computeAgeAssuranceFlags({
|
|||||||
adultContentDisabled,
|
adultContentDisabled,
|
||||||
chatDisabled,
|
chatDisabled,
|
||||||
groupChatDisabled,
|
groupChatDisabled,
|
||||||
|
hasDeclaredAge: metadata?.declaredAge !== undefined,
|
||||||
isDeclaredUnderAdultAge,
|
isDeclaredUnderAdultAge,
|
||||||
isOverRegionMinAccessAge,
|
isOverRegionMinAccessAge,
|
||||||
isOverAppMinAccessAge,
|
isOverAppMinAccessAge,
|
||||||
|
|||||||
Reference in New Issue
Block a user