From: Daniel Karbach Date: Tue, 28 Feb 2023 08:56:16 +0000 (+0100) Subject: fix sticky nav X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=61a4fe3d05b90438d40ad94a9870f3ee409361fa;hp=0d1207dcfc97a2d91dccdbef869f053249f15f5a;p=alttp.git fix sticky nav --- diff --git a/resources/js/components/common/Header.js b/resources/js/components/common/Header.js index 1bb2ce1..53119bc 100644 --- a/resources/js/components/common/Header.js +++ b/resources/js/components/common/Header.js @@ -2,6 +2,7 @@ import PropTypes from 'prop-types'; import React from 'react'; import { Button, Container, Nav, Navbar } from 'react-bootstrap'; import { LinkContainer } from 'react-router-bootstrap'; +import { useLocation } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import Icon from './Icon'; @@ -10,6 +11,7 @@ import { getAvatarUrl } from '../../helpers/User'; import { withUser } from '../../helpers/UserContext'; const Header = ({ doLogout, user }) => { + const { pathname } = useLocation(); const { t } = useTranslation(); return @@ -19,7 +21,7 @@ const Header = ({ doLogout, user }) => { ALttP -