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