Skip to content

Commit

Permalink
Bugfix: Correct Cookies (#5)
Browse files Browse the repository at this point in the history
* yaml

* banner handling

* script

* cookie-correct-implementation

* set fun cookie

* build script

* update version
  • Loading branch information
MysterieDev authored Sep 13, 2021
1 parent 982fac0 commit d253cd7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion public/cookiebanner-index.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion solid-frontend-dev/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vite-template-solid",
"version": "1.0.1",
"version": "1.0.2",
"description": "",
"scripts": {
"start": "vite",
Expand Down
2 changes: 2 additions & 0 deletions solid-frontend-dev/src/banner-handling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ export function handleFinishedConsentInteraction(category: CookieCategory) {
setConsentFunCookie(false);
}
if (category === CookieCategory.marketing) {
setConsentFunCookie(true);
setConsentMarCookie(true);
consent.fun = true;
consent.mar = true;
} else {
setConsentMarCookie(false);
Expand Down
4 changes: 2 additions & 2 deletions solid-frontend-dev/src/consent-handling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ export function setConsentReqCookie() {
});
}
export function setConsentFunCookie(allowed: boolean) {
return Cookies.set(consentMarCookie, allowed ? "TRUE" : "FALSE", {
return Cookies.set(consentFunCookie, allowed ? "TRUE" : "FALSE", {
expires: consentDurationInDays,
});
}

export function setConsentMarCookie(allowed: boolean) {
return Cookies.set(consentFunCookie, allowed ? "TRUE" : "FALSE", {
return Cookies.set(consentMarCookie, allowed ? "TRUE" : "FALSE", {
expires: consentDurationInDays,
});
}
Expand Down

0 comments on commit d253cd7

Please sign in to comment.