From e4390d83e6241c2852290440914af308571ef56a Mon Sep 17 00:00:00 2001 From: Untone Date: Mon, 1 Jul 2024 18:30:45 +0300 Subject: [PATCH] header-links-fix --- src/components/Nav/Header/Header.tsx | 103 +++++++++--------- .../Views/AllAuthors/AllAuthors.tsx | 22 ++-- src/routes/topics.tsx | 2 +- 3 files changed, 66 insertions(+), 61 deletions(-) diff --git a/src/components/Nav/Header/Header.tsx b/src/components/Nav/Header/Header.tsx index 9c88d968..7a686bdb 100644 --- a/src/components/Nav/Header/Header.tsx +++ b/src/components/Nav/Header/Header.tsx @@ -17,7 +17,6 @@ import { HeaderAuth } from '../HeaderAuth' import { Modal } from '../Modal' import { SearchModal } from '../SearchModal/SearchModal' import { Snackbar } from '../Snackbar' -import { Link } from './Link' import { A, useLocation, useNavigate, useSearchParams } from '@solidjs/router' import styles from './Header.module.scss' @@ -209,58 +208,64 @@ export const Header = (props: Props) => {
@@ -415,40 +420,40 @@ export const Header = (props: Props) => { >
@@ -464,17 +469,17 @@ export const Header = (props: Props) => { {(topic: Topic) => (
  • - + #{tag(topic)} - +
  • )}
  • - + {t('All topics')} - +
  • diff --git a/src/components/Views/AllAuthors/AllAuthors.tsx b/src/components/Views/AllAuthors/AllAuthors.tsx index d064572b..b8fa3e0a 100644 --- a/src/components/Views/AllAuthors/AllAuthors.tsx +++ b/src/components/Views/AllAuthors/AllAuthors.tsx @@ -41,7 +41,7 @@ export const AllAuthors = (props: Props) => { }) const filteredAuthors = createMemo(() => { const query = searchQuery().toLowerCase() - return authorsSorted().filter((author: Author) => { + return authorsSorted?.().filter((author: Author) => { // Предполагаем, что у автора есть свойство name return author?.name?.toLowerCase().includes(query) }) @@ -62,22 +62,22 @@ export const AllAuthors = (props: Props) => { return keys }) - const ogImage = getImageUrl('production/image/logo_image.png') - const ogTitle = t('Authors') - const description = t('List of authors of the open editorial community') + const ogImage = createMemo(() => getImageUrl('production/image/logo_image.png')) + const ogTitle = createMemo(() => t('Authors')) + const description = createMemo(() => t('List of authors of the open editorial community')) return (
    - + - - - - + + + + - - + + }>
    diff --git a/src/routes/topics.tsx b/src/routes/topics.tsx index 2796d911..0a2a588f 100644 --- a/src/routes/topics.tsx +++ b/src/routes/topics.tsx @@ -25,7 +25,7 @@ export default function AllTopicsPage(props: RouteSectionProps<{ topics: Topic[] }> - +