Userpic in the sidebar on the feed page
This commit is contained in:
parent
9754a0235d
commit
e4ac8d8b56
|
@ -9,6 +9,7 @@ import { useSession } from '../../../context/session'
|
||||||
import { useLocalize } from '../../../context/localize'
|
import { useLocalize } from '../../../context/localize'
|
||||||
import styles from './Sidebar.module.scss'
|
import styles from './Sidebar.module.scss'
|
||||||
import { clsx } from 'clsx'
|
import { clsx } from 'clsx'
|
||||||
|
import Userpic from '../../Author/Userpic'
|
||||||
|
|
||||||
type FeedSidebarProps = {
|
type FeedSidebarProps = {
|
||||||
authors: Author[]
|
authors: Author[]
|
||||||
|
@ -110,7 +111,12 @@ export const Sidebar = (props: FeedSidebarProps) => {
|
||||||
classList={{ [styles.unread]: checkAuthorIsSeen(authorSlug) }}
|
classList={{ [styles.unread]: checkAuthorIsSeen(authorSlug) }}
|
||||||
>
|
>
|
||||||
<div class={styles.sidebarItemName}>
|
<div class={styles.sidebarItemName}>
|
||||||
<Icon name="hash" class={styles.icon} />
|
<Show when={authorEntities()[authorSlug]}>
|
||||||
|
<Userpic user={authorEntities()[authorSlug]?.userpic} />
|
||||||
|
</Show>
|
||||||
|
<Show when={!authorEntities()[authorSlug]}>
|
||||||
|
<Icon name="hash" class={styles.icon} />
|
||||||
|
</Show>
|
||||||
{authorSlug}
|
{authorSlug}
|
||||||
{authorEntities()[authorSlug]?.name}
|
{authorEntities()[authorSlug]?.name}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user