@@ -22,13 +22,7 @@ import { uniq } from '../helpers/array'
2222import { IS_CLIENT } from '../helpers/isClient'
2323import { stringToHash } from '../helpers/misc'
2424import { isCategoryKind } from '../types'
25- import type {
26- Config ,
27- Consent ,
28- Destination ,
29- Destinations ,
30- EssentialDestination ,
31- } from '../types'
25+ import type { Config , Consent , Destination , Destinations } from '../types'
3226
3327type Context = {
3428 destinations : Destinations
@@ -55,7 +49,6 @@ export const useCookieConsent = (): Context => {
5549export const CookieConsentProvider = ( {
5650 children,
5751 isConsentRequired,
58- essentialDestinations,
5952 manualDestinations,
6053 config,
6154 cookiePrefix = COOKIE_PREFIX ,
@@ -64,7 +57,6 @@ export const CookieConsentProvider = ({
6457 cookiesOptions = COOKIES_OPTIONS ,
6558} : PropsWithChildren < {
6659 isConsentRequired : boolean
67- essentialDestinations : EssentialDestination [ ]
6860 manualDestinations ?: Destinations
6961 config : Config
7062 cookiePrefix ?: string
@@ -93,17 +85,9 @@ export const CookieConsentProvider = ({
9385 category : dest . consents [ 0 ] ?? 'essential' ,
9486 } ) satisfies Destination ,
9587 ) ,
96- ...essentialDestinations . map (
97- dest =>
98- ( {
99- name : dest . name ,
100- displayName : dest . displayName ,
101- category : 'essential' ,
102- } ) satisfies Destination ,
103- ) ,
10488 ...( manualDestinations ?? [ ] ) ,
10589 ] ) ,
106- [ analyticsDestinations , essentialDestinations , manualDestinations ] ,
90+ [ analyticsDestinations , manualDestinations ] ,
10791 )
10892
10993 // We compute a hash with all the integrations that are enabled
0 commit comments