Skip to content

Commit

Permalink
fix: provided cookie settings not being applied
Browse files Browse the repository at this point in the history
  • Loading branch information
daltonmenezes committed Dec 2, 2022
1 parent 1bec91d commit e16ed6c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gh-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Release GH Page

on:
workflow_dispatch:
release:
label:
types:
- "published"
- created

permissions:
contents: read
Expand Down
4 changes: 4 additions & 0 deletions apps/web/src/templates/Home/Playground/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ export function PlaygroundSection() {
registerHandler,
willBeTriggered,
} = useExitIntent({
cookie: {
key: 'use-exit-intent',
},

desktop: {
delayInSecondsToTrigger: 1,
triggerOnIdle: false,
Expand Down
6 changes: 6 additions & 0 deletions packages/use-exit-intent/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# use-exit-intent

## 1.0.7

### Patch Changes

- fix an issue where provided cookie settings were not being applied

## 1.0.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/use-exit-intent/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "use-exit-intent",
"version": "1.0.6",
"version": "1.0.7",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/index.d.ts",
Expand Down
5 changes: 5 additions & 0 deletions packages/use-exit-intent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ export function useExitIntent(props: ExitIntentSettings | void = {}) {
const initialSettings: InternalExitIntentSettings = {
...defaultSettings,

cookie: {
...defaultSettings.cookie,
...props?.cookie,
},

desktop: {
...defaultSettings.desktop,
...props?.desktop,
Expand Down

0 comments on commit e16ed6c

Please sign in to comment.