chore: update content, sitemap and lib files
This commit is contained in:
@@ -31,7 +31,7 @@ export const useConsentStore = create<ConsentState>((set) => ({
|
||||
if (typeof window !== 'undefined') {
|
||||
let stored = localStorage.getItem(CONSENT_KEY);
|
||||
|
||||
// Migration logic
|
||||
|
||||
if (!stored) {
|
||||
const oldStored = localStorage.getItem(OLD_CONSENT_KEY);
|
||||
if (oldStored) {
|
||||
@@ -47,7 +47,6 @@ export const useConsentStore = create<ConsentState>((set) => ({
|
||||
localStorage.setItem(CONSENT_KEY, stored);
|
||||
localStorage.removeItem(OLD_CONSENT_KEY);
|
||||
} catch {
|
||||
// Ignore if parse fails
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,11 +63,9 @@ export const useConsentStore = create<ConsentState>((set) => ({
|
||||
advertising: !!parsed.advertising,
|
||||
});
|
||||
} catch {
|
||||
// If parsing fails, show banner
|
||||
set({ isInitialized: true, isOpen: true });
|
||||
}
|
||||
} else {
|
||||
// No consent found, show banner
|
||||
set({ isInitialized: true, isOpen: true });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user