From c804efb32344f851354acd5f995f602975cd2cd9 Mon Sep 17 00:00:00 2001 From: tonyrewin Date: Wed, 14 Sep 2022 17:40:33 +0300 Subject: [PATCH] fix-header --- src/components/Nav/Header.tsx | 7 ++++--- src/components/Views/ArticlePage.tsx | 5 ++--- src/stores/router.ts | 14 +------------- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/src/components/Nav/Header.tsx b/src/components/Nav/Header.tsx index 9ffbd4bf..d2851ee2 100644 --- a/src/components/Nav/Header.tsx +++ b/src/components/Nav/Header.tsx @@ -8,7 +8,7 @@ import { t } from '../../utils/intl' import { useModalStore, showModal, useWarningsStore } from '../../stores/ui' import { useStore } from '@nanostores/solid' import { session as ssession } from '../../stores/auth' -import { route, resource } from '../../stores/router' +import { route, router } from '../../stores/router' import './Header.scss' const resources = [ @@ -26,7 +26,8 @@ export const Header = () => { const { getWarnings } = useWarningsStore() const session = useStore(ssession) const { getModal } = useModalStore() - const subpath = useStore(resource) + const routing = useStore(router) + const subpath = createMemo(() => routing().path) // methods const toggleWarnings = () => setVisibleWarnings(!visibleWarnings()) const toggleFixed = () => setFixed(!fixed()) @@ -58,7 +59,7 @@ export const Header = () => {