Merge pull request #17 from Discours/lint-fix

lint fixes
This commit is contained in:
Igor Lobanov 2022-09-29 13:51:31 +02:00 committed by GitHub
commit 12d4e94724
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 10 deletions

View File

@ -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>
)} )}

View File

@ -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'

View File

@ -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 (

View File

@ -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')

View File

@ -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) =>