commit
12d4e94724
|
@ -6,7 +6,8 @@ import { t } from '../../utils/intl'
|
|||
import { locale } from '../../stores/ui'
|
||||
|
||||
export const NavTopics = (props: { topics: Topic[] }) => {
|
||||
const tag = (t: Topic) => (/[ЁА-яё]/.test(t.title || '') && locale() !== 'ru' ? t.slug : t.title)
|
||||
const tag = (topic: Topic) =>
|
||||
/[ЁА-яё]/.test(topic.title || '') && locale() !== 'ru' ? topic.slug : topic.title
|
||||
|
||||
// TODO: something about subtopics
|
||||
return (
|
||||
|
@ -14,10 +15,10 @@ export const NavTopics = (props: { topics: Topic[] }) => {
|
|||
<ul class="topics">
|
||||
<Show when={props.topics.length > 0}>
|
||||
<For each={props.topics}>
|
||||
{(t: Topic) => (
|
||||
{(topic) => (
|
||||
<li class="item">
|
||||
<a href={`/topic/${t.slug}`}>
|
||||
<span>#{tag(t)}</span>
|
||||
<a href={`/topic/${topic.slug}`}>
|
||||
<span>#{tag(topic)}</span>
|
||||
</a>
|
||||
</li>
|
||||
)}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// import 'solid-devtools'
|
||||
|
||||
import { setLocale } from '../stores/ui'
|
||||
import { Component, createEffect, createMemo, lazy } from 'solid-js'
|
||||
import { Component, createEffect, createMemo } from 'solid-js'
|
||||
import { Routes, useRouter } from '../stores/router'
|
||||
import { Dynamic, isServer } from 'solid-js/web'
|
||||
import { getLogger } from '../utils/logger'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { t } from '../../utils/intl'
|
||||
import { Icon } from '../Nav/Icon'
|
||||
import styles from '../../styles/FourOuFour.module.scss'
|
||||
import clsx from 'clsx'
|
||||
import { clsx } from 'clsx'
|
||||
|
||||
export const FourOuFourView = (_props) => {
|
||||
return (
|
||||
|
|
|
@ -3,8 +3,7 @@ import type { Author } from '../../graphql/types.gen'
|
|||
import { byCreated } from '../../utils/sortby'
|
||||
|
||||
import { getLogger } from '../../utils/logger'
|
||||
import { Accessor, createMemo, createSignal } from 'solid-js'
|
||||
import type { Signal } from 'solid-js'
|
||||
import { createMemo, createSignal } from 'solid-js'
|
||||
|
||||
const log = getLogger('authors store')
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ export const loadReactions = async ({
|
|||
limit: number
|
||||
offset: number
|
||||
}): Promise<void> => {
|
||||
const reactions = await apiClient.getReactionsForShouts({ shoutSlugs, limit, offset })
|
||||
reactionsOrdered.set(reactions)
|
||||
const reactionsForShouts = await apiClient.getReactionsForShouts({ shoutSlugs, limit, offset })
|
||||
reactionsOrdered.set(reactionsForShouts)
|
||||
}
|
||||
|
||||
export const createReaction = async (reaction: Reaction) =>
|
||||
|
|
Loading…
Reference in New Issue
Block a user