We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 521f740 commit 90cfe12Copy full SHA for 90cfe12
client/src/Pages/CardsPage.js
@@ -76,8 +76,11 @@ function CardsPage() {
76
77
/** очистка оштбок хука запросов и запись ошибки в сообщение*/
78
React.useEffect(() => {
79
- if (error) setMessage([error, false])
+ if (error) setMessage(error)
80
+ /**Выйти в случае неавторизации */
81
+ if (error === 'Нет авторизации') auth.logout()
82
clearError()
83
+ // eslint-disable-next-line react-hooks/exhaustive-deps
84
}, [error, clearError])
85
86
/**Массив заметок */
0 commit comments