From 576485d20c68f915518f5231ead66aa3af1301a5 Mon Sep 17 00:00:00 2001 From: Aurora Lahtela <24460436+AuroraLS3@users.noreply.github.com> Date: Sun, 5 Jun 2022 22:12:00 +0300 Subject: [PATCH] Fix players page title --- .../dashboard/src/views/layout/PlayersPage.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Plan/react/dashboard/src/views/layout/PlayersPage.js b/Plan/react/dashboard/src/views/layout/PlayersPage.js index dc0a675e2..8c8530ab4 100644 --- a/Plan/react/dashboard/src/views/layout/PlayersPage.js +++ b/Plan/react/dashboard/src/views/layout/PlayersPage.js @@ -3,7 +3,6 @@ import {useTranslation} from "react-i18next"; import {Outlet} from "react-router-dom"; import {useNavigation} from "../../hooks/navigationHook"; import {faSearch} from "@fortawesome/free-solid-svg-icons"; -import {useAuth} from "../../hooks/authenticationHook"; import {NightModeCss} from "../../hooks/themeHook"; import Sidebar from "../../components/navigation/Sidebar"; import Header from "../../components/navigation/Header"; @@ -18,7 +17,7 @@ const PlayersPage = () => { const [error] = useState(undefined); const [sidebarItems, setSidebarItems] = useState([]); - const {currentTab} = useNavigation(); + const {currentTab, setCurrentTab} = useNavigation(); useEffect(() => { const items = [ @@ -28,15 +27,16 @@ const PlayersPage = () => { setSidebarItems(items); window.document.title = `Plan | Player list`; - }, [t, i18n]) + setCurrentTab('html.label.players') + }, [t, i18n, setCurrentTab]) - const {authRequired, user} = useAuth(); - const showBackButton = isProxy && (!authRequired || user.permissions.filter(perm => perm !== 'page.network').length); + // const {authRequired, user} = useAuth(); + const showBackButton = true; // TODO if (error) { return <> - + @@ -55,7 +55,7 @@ const PlayersPage = () => { return ( <> - +