feat(chat-window): clear storage after error
This commit is contained in:
parent
6e61c88c9e
commit
94ea6c372a
|
@ -108,6 +108,9 @@ const useSocket = (url: string) => {
|
|||
const parsedData = JSON.parse(e.data);
|
||||
if (parsedData.type === 'error') {
|
||||
toast.error(parsedData.data);
|
||||
if (parsedData.key === 'INVALID_MODEL_SELECTED') {
|
||||
localStorage.clear();
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue