Skip to content

Commit

Permalink
feat: add the hb.toasts.cookie_name parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Dec 1, 2024
1 parent 2b952f2 commit 967d4fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/hb/modules/toasts/js/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import params from '@params'
import Toast from 'js/bootstrap/src/toast.js'
import { getCookie, deleteCookie } from '@hugomods/cookies'

Expand Down Expand Up @@ -82,5 +83,5 @@ export const readToastsFromCookie = (name: string): void => {
}

(() => {
readToastsFromCookie('hb-toasts')
readToastsFromCookie(params.toasts.cookie_name)
})()
1 change: 1 addition & 0 deletions hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ path = "github.com/hbstack/hb"
path = "github.com/hugomods/cookies"

[params.hb.toasts]
cookie_name = 'hb-toasts'

0 comments on commit 967d4fe

Please sign in to comment.