From c79b0451cb11329935f085034557f9fab4125a31 Mon Sep 17 00:00:00 2001 From: Untone Date: Tue, 16 Jul 2024 01:13:19 +0300 Subject: [PATCH] linking-fix --- src/components/Feed/Sidebar/Sidebar.tsx | 25 +++++++++------------ src/components/Nav/Header/Header.tsx | 6 ++--- src/components/Views/Feed/Feed.tsx | 6 ++--- src/intl/locales/ru/translation.json | 1 + src/routes/feed/my/[...mode]/[...order].tsx | 2 +- 5 files changed, 19 insertions(+), 21 deletions(-) diff --git a/src/components/Feed/Sidebar/Sidebar.tsx b/src/components/Feed/Sidebar/Sidebar.tsx index 01f83d31..c78b2169 100644 --- a/src/components/Feed/Sidebar/Sidebar.tsx +++ b/src/components/Feed/Sidebar/Sidebar.tsx @@ -1,7 +1,6 @@ +import { A, useLocation, useParams } from '@solidjs/router' import { clsx } from 'clsx' import { For, Show, createSignal } from 'solid-js' - -import { A, useMatch } from '@solidjs/router' import { Icon } from '~/components/_shared/Icon' import { useFeed } from '~/context/feed' import { useFollowing } from '~/context/following' @@ -15,10 +14,8 @@ export const Sidebar = () => { const { follows } = useFollowing() const { feedByTopic, feedByAuthor, seen } = useFeed() const [isSubscriptionsVisible, setSubscriptionsVisible] = createSignal(true) - const matchFeed = useMatch(() => '/feed') - const matchFeedMy = useMatch(() => '/feed/followed') - const matchFeedCollabs = useMatch(() => '/feed/coauthored') - const matchFeedDiscussions = useMatch(() => '/feed/discussed') + const loc = useLocation() + const params = useParams() const checkTopicIsSeen = (topicSlug: string) => { return feedByTopic()[topicSlug]?.every((article) => Boolean(seen()[article.slug])) } @@ -32,9 +29,9 @@ export const Sidebar = () => {