Skip to content
This repository was archived by the owner on Sep 18, 2024. It is now read-only.

Commit 9fef135

Browse files
Merge pull request #1533 from navikt/clearCookieOnChatClose
Clears chat conversation cookie on chat close
2 parents 3efed05 + 1e65cb6 commit 9fef135

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/komponenter/footer/chatbot/ChatbotWrapper.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ export const ChatbotWrapper = () => {
136136
boost.chatPanel.setFilterValues(ev.detail.filterValue);
137137
if (ev.detail.nextId) boost.chatPanel.triggerAction(ev.detail.nextId);
138138
});
139+
boost.chatPanel.addEventListener('chatPanelClosed', () => {
140+
removeCookie(conversationCookieName);
141+
});
139142

140143
if (bufferLoad) {
141144
setBufferLoad(false);

0 commit comments

Comments
 (0)