Fixed code style

This commit is contained in:
kvakazyambra 2024-05-25 19:35:02 +03:00
parent 3319bfe973
commit 309b07c596
2 changed files with 13 additions and 17 deletions

View File

@ -1,11 +1,4 @@
import { import { Author, AuthorsBy, LoadShoutsOptions, Shout, Topic } from '../../graphql/schema/core.gen'
Author,
AuthorsBy,
LoadShoutsOptions,
QueryLoad_Authors_ByArgs,
Shout,
Topic,
} from '../../graphql/schema/core.gen'
import { clsx } from 'clsx' import { clsx } from 'clsx'
import { For, Show, createEffect, createMemo, createSignal, on, onMount } from 'solid-js' import { For, Show, createEffect, createMemo, createSignal, on, onMount } from 'solid-js'

View File

@ -1,9 +1,9 @@
import {For, Show} from 'solid-js' import { For, Show } from 'solid-js'
import {useLocalize} from '../../../context/localize' import { useLocalize } from '../../../context/localize'
import {Author, Topic} from '../../../graphql/schema/core.gen' import { Author, Topic } from '../../../graphql/schema/core.gen'
import {Userpic} from '../../Author/Userpic' import { Userpic } from '../../Author/Userpic'
import styles from './Subscribers.module.scss' import styles from './Subscribers.module.scss'
@ -15,7 +15,7 @@ type Props = {
} }
export const Subscribers = (props: Props) => { export const Subscribers = (props: Props) => {
const {t} = useLocalize() const { t } = useLocalize()
return ( return (
<> <>
@ -23,7 +23,7 @@ export const Subscribers = (props: Props) => {
<Show when={props.followers && props.followers.length > 0}> <Show when={props.followers && props.followers.length > 0}>
<div class={styles.subscribersList}> <div class={styles.subscribersList}>
<For each={props.followers.slice(0, 3)}> <For each={props.followers.slice(0, 3)}>
{(f) => <Userpic size={'XS'} name={f.name} userpic={f.pic} class={styles.subscribersItem}/>} {(f) => <Userpic size={'XS'} name={f.name} userpic={f.pic} class={styles.subscribersItem} />}
</For> </For>
</div> </div>
</Show> </Show>
@ -40,12 +40,15 @@ export const Subscribers = (props: Props) => {
<For each={props.following.slice(0, 3)}> <For each={props.following.slice(0, 3)}>
{(f) => { {(f) => {
if ('name' in f) { if ('name' in f) {
return <Userpic size={'XS'} name={f.name} userpic={f.pic} class={styles.subscribersItem}/> return (
<Userpic size={'XS'} name={f.name} userpic={f.pic} class={styles.subscribersItem} />
)
} }
if ('title' in f) { if ('title' in f) {
return <Userpic size={'XS'} name={f.title} userpic={f.pic} return (
class={styles.subscribersItem}/> <Userpic size={'XS'} name={f.title} userpic={f.pic} class={styles.subscribersItem} />
)
} }
return null return null