Add Japan-gated custom logo (#11161)

This commit is contained in:
Samuel Newman
2026-07-16 14:26:05 +03:00
committed by GitHub
parent 4037392105
commit 406fb5425c
21 changed files with 80 additions and 34 deletions
+20
View File
@@ -0,0 +1,20 @@
import {useKawaiiMode} from '#/state/preferences/kawaii'
import {useAnalytics} from '#/analytics'
import {useGeolocation} from '#/geolocation'
export type LogoVariant = 'default' | 'japan' | 'kawaii'
export function useLogoVariant(allowVariants = true): LogoVariant {
const ax = useAnalytics()
const geolocation = useGeolocation()
const kawaii = useKawaiiMode()
const japanLogoEnabled =
allowVariants &&
geolocation.countryCode === 'JP' &&
ax.features.enabled(ax.features.CustomLogoJapanEnable)
if (!allowVariants) return 'default'
if (japanLogoEnabled) return 'japan'
if (kawaii) return 'kawaii'
return 'default'
}