mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
Update branding.ts
This commit is contained in:
@@ -11,6 +11,30 @@ export interface AnimationEnabled {
|
|||||||
enabled: boolean
|
enabled: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const BRANDING_CACHE_KEY = 'cabinet_branding'
|
||||||
|
|
||||||
|
// Get cached branding from localStorage
|
||||||
|
export const getCachedBranding = (): BrandingInfo | null => {
|
||||||
|
try {
|
||||||
|
const cached = localStorage.getItem(BRANDING_CACHE_KEY)
|
||||||
|
if (cached) {
|
||||||
|
return JSON.parse(cached)
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
// localStorage not available or invalid JSON
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update branding cache in localStorage
|
||||||
|
export const setCachedBranding = (branding: BrandingInfo) => {
|
||||||
|
try {
|
||||||
|
localStorage.setItem(BRANDING_CACHE_KEY, JSON.stringify(branding))
|
||||||
|
} catch {
|
||||||
|
// localStorage not available
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export const brandingApi = {
|
export const brandingApi = {
|
||||||
// Get current branding (public, no auth required)
|
// Get current branding (public, no auth required)
|
||||||
getBranding: async (): Promise<BrandingInfo> => {
|
getBranding: async (): Promise<BrandingInfo> => {
|
||||||
|
|||||||
Reference in New Issue
Block a user