mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2024-09-11 12:05:38 +03:00
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
Block a user