From ce62f7bc0364972de48653b0b9696178cc1ff391 Mon Sep 17 00:00:00 2001 From: aphilibeaux Date: Fri, 12 Sep 2025 15:05:27 +0200 Subject: [PATCH] fix(analytics): type providers --- .changeset/social-moons-rush.md | 5 +++++ .../src/cookies-consent/CookieConsentProvider.tsx | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/social-moons-rush.md diff --git a/.changeset/social-moons-rush.md b/.changeset/social-moons-rush.md new file mode 100644 index 000000000..89225e5e5 --- /dev/null +++ b/.changeset/social-moons-rush.md @@ -0,0 +1,5 @@ +--- +"@scaleway/use-analytics": patch +--- + +Add missing type to consent context diff --git a/packages/use-analytics/src/cookies-consent/CookieConsentProvider.tsx b/packages/use-analytics/src/cookies-consent/CookieConsentProvider.tsx index 874c30ba4..ba056e5af 100644 --- a/packages/use-analytics/src/cookies-consent/CookieConsentProvider.tsx +++ b/packages/use-analytics/src/cookies-consent/CookieConsentProvider.tsx @@ -36,6 +36,8 @@ type Context = { isDestinationsLoaded: boolean categories: typeof CATEGORIES categoriesConsent: Partial + allowedConsents: (keyof Consent)[] + deniedConsents: (keyof Consent)[] saveConsent: (categoriesConsent: Partial) => void }