Skip to content

Commit 42463ae

Browse files
committed
navhook usage fix
1 parent c414fdc commit 42463ae

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

client/src/Pages/AboutPage.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/**
22
* @file AboutPage.js
33
*/
4-
import React, { useContext } from 'react'
5-
import { AuthContext } from '../Context/AuthContext'
4+
import React from 'react'
65
import { NavLink } from 'react-router-dom'
76
import './AboutPage.css'
87
import useNavbarEffect from '../Hooks/useNavbarEffect.hook'
@@ -11,9 +10,6 @@ import useNavbarEffect from '../Hooks/useNavbarEffect.hook'
1110
* Страница инфо
1211
*/
1312
function AboutPage() {
14-
/**подключение контекста авторизации */
15-
const auth = useContext(AuthContext)
16-
1713
/**
1814
* Обновление навбара при переходе на эту страницу и изменениях
1915
*/
@@ -22,7 +18,7 @@ function AboutPage() {
2218
<NavLink to="/auth" className="btn btn-light m-1">
2319
<span>Назад</span>
2420
</NavLink>,
25-
[auth.isAuthenticated, auth.token]
21+
[]
2622
)
2723

2824
/**рендер */

client/src/Pages/AuthPage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function AuthPage() {
8686
<span>К заметкам</span>
8787
</NavLink>}
8888
</React.Fragment>,
89-
[auth.isAuthenticated, auth.token]
89+
[auth.isAuthenticated]
9090
)
9191

9292
/**рендер */

client/src/Pages/NotesPage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ function NotesPage() {
218218
<span><i className="bi bi-person"></i> {auth.email}</span>
219219
</NavLink>
220220
</React.Fragment>,
221-
[auth.email, auth.token, loading]
221+
[auth.email, loading]
222222
)
223223

224224
/**рендер */

0 commit comments

Comments
 (0)