diff --git a/biome.json b/biome.json index 31fec0e0..31049f65 100644 --- a/biome.json +++ b/biome.json @@ -27,6 +27,7 @@ "useOptionalChain": "warn" }, "a11y": { + "useHeadingContent": "off", "useKeyWithClickEvents": "off", "useKeyWithMouseEvents": "off", "useAnchorContent": "off", diff --git a/src/components/Author/AuthorCard/AuthorCard.tsx b/src/components/Author/AuthorCard/AuthorCard.tsx index d7cc72e6..2b513057 100644 --- a/src/components/Author/AuthorCard/AuthorCard.tsx +++ b/src/components/Author/AuthorCard/AuthorCard.tsx @@ -165,7 +165,9 @@ export const AuthorCard = (props: Props) => { class={styles.subscribersItem} /> ) - } else if ('title' in f) { + } + + if ('title' in f) { return ( { /> ) } + return null }} @@ -196,7 +199,7 @@ export const AuthorCard = (props: Props) => { class={styles.socialLink} href={link.startsWith('http') ? link : `https://${link}`} target="_blank" - rel="nofollow noopener" + rel="nofollow noopener noreferrer" > {link.startsWith('http') ? link : `https://${link}`} diff --git a/src/pages/article.page.tsx b/src/pages/article.page.tsx index f212cc46..4d373f6c 100644 --- a/src/pages/article.page.tsx +++ b/src/pages/article.page.tsx @@ -16,7 +16,7 @@ export const ArticlePage = (props: PageProps) => { const shouts = props.article ? [props.article] : [] const { page } = useRouter() - const slug = createMemo(() => page().params['slug'] as string) + const slug = createMemo(() => page().params.slug as string) const { articleEntities } = useArticlesStore({ shouts, diff --git a/src/pages/author.page.tsx b/src/pages/author.page.tsx index 3a357acb..f0b3dc68 100644 --- a/src/pages/author.page.tsx +++ b/src/pages/author.page.tsx @@ -14,7 +14,7 @@ import { loadAuthor } from '../stores/zine/authors' export const AuthorPage = (props: PageProps) => { const { t } = useLocalize() const { page } = useRouter() - const slug = createMemo(() => page().params['slug'] as string) + const slug = createMemo(() => page().params.slug as string) const [isLoaded, setIsLoaded] = createSignal( Boolean(props.authorShouts) && Boolean(props.author) && props.author.slug === slug(), diff --git a/src/pages/expo/expo.page.tsx b/src/pages/expo/expo.page.tsx index 2d32ead4..6ac08d14 100644 --- a/src/pages/expo/expo.page.tsx +++ b/src/pages/expo/expo.page.tsx @@ -12,7 +12,7 @@ import { LayoutType } from '../types' export const ExpoPage = (props: PageProps) => { const { t } = useLocalize() const { page } = useRouter() - const getLayout = createMemo(() => page().params['layout'] as LayoutType) + const getLayout = createMemo(() => page().params.layout as LayoutType) const getTitle = () => { switch (getLayout()) { diff --git a/src/pages/search.page.tsx b/src/pages/search.page.tsx index 82858bd4..abb1872d 100644 --- a/src/pages/search.page.tsx +++ b/src/pages/search.page.tsx @@ -14,11 +14,11 @@ export const SearchPage = (props: PageProps) => { const [isLoaded, setIsLoaded] = createSignal(Boolean(props.searchResults)) const { t } = useLocalize() const { page } = useRouter() - const q = createMemo(() => page().params['q'] as string) + const q = createMemo(() => page().params.q as string) createEffect(async () => { if (isLoaded()) return - else if (q() && window) { + if (q() && window) { const text = q() || window.location.href.split('/').pop() // TODO: pagination, load more await loadShoutsSearch({ text, limit: 50, offset: 0 }) diff --git a/src/pages/topic.page.tsx b/src/pages/topic.page.tsx index 3e1204b1..21836793 100644 --- a/src/pages/topic.page.tsx +++ b/src/pages/topic.page.tsx @@ -12,7 +12,7 @@ import { loadTopic } from '../stores/zine/topics' export const TopicPage = (props: PageProps) => { const { page } = useRouter() - const slug = createMemo(() => page().params['slug'] as string) + const slug = createMemo(() => page().params.slug as string) const [isLoaded, setIsLoaded] = createSignal( Boolean(props.topicShouts) && Boolean(props.topic) && props.topic.slug === slug(),