Skip to content

Commit 6ed42aa

Browse files
scaleway-botphilibea
authored andcommitted
chore: add changeset renovate-4f825ef
Signed-off-by: Alexandre Philibeaux <[email protected]>
1 parent 797d82b commit 6ed42aa

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.changeset/renovate-4f825ef.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@scaleway/cookie-consent': patch
3+
---
4+
5+
Updated dependency `cookie` to `1.0.1`.

packages/cookie-consent/src/CookieConsentProvider/CookieConsentProvider.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { CookieSerializeOptions } from 'cookie'
1+
import type { SerializeOptions } from 'cookie'
22
import cookie from 'cookie'
33
import type { PropsWithChildren } from 'react'
44
import {
@@ -24,7 +24,7 @@ const CONSENT_MAX_AGE = 13 * 30 * 24 * 60 * 60
2424
// Appx 6 Months
2525
const CONSENT_ADVERTISING_MAX_AGE = 6 * 30 * 24 * 60 * 60
2626

27-
const COOKIES_OPTIONS = {
27+
const COOKIES_OPTIONS: SerializeOptions = {
2828
sameSite: 'strict',
2929
secure: true,
3030
path: '/',
@@ -69,10 +69,10 @@ export const CookieConsentProvider = ({
6969
cookiePrefix?: string
7070
consentMaxAge?: number
7171
consentAdvertisingMaxAge?: number
72-
cookiesOptions?: CookieSerializeOptions
72+
cookiesOptions?: SerializeOptions
7373
}>) => {
7474
const [needConsent, setNeedsConsent] = useState(false)
75-
const [cookies, setCookies] = useState<Record<string, string>>(
75+
const [cookies, setCookies] = useState<Record<string, string | undefined>>(
7676
IS_CLIENT ? cookie.parse(document.cookie) : {},
7777
)
7878

0 commit comments

Comments
 (0)