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

Commit

Permalink
Merge pull request #1533 from navikt/clearCookieOnChatClose
Browse files Browse the repository at this point in the history
Clears chat conversation cookie on chat close
  • Loading branch information
terjeofnorway authored Apr 3, 2024
2 parents 3efed05 + 1e65cb6 commit 9fef135
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/komponenter/footer/chatbot/ChatbotWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ export const ChatbotWrapper = () => {
boost.chatPanel.setFilterValues(ev.detail.filterValue);
if (ev.detail.nextId) boost.chatPanel.triggerAction(ev.detail.nextId);
});
boost.chatPanel.addEventListener('chatPanelClosed', () => {
removeCookie(conversationCookieName);
});

if (bufferLoad) {
setBufferLoad(false);
Expand Down

0 comments on commit 9fef135

Please sign in to comment.