import { For } from 'solid-js' import type { Author } from '../../graphql/types.gen' import { useAuthStore } from '../../stores/auth' import { useAuthorsStore } from '../../stores/zine/authors' import { t } from '../../utils/intl' import { Icon } from '../Nav/Icon' import { useTopicsStore } from '../../stores/zine/topics' import { useArticlesStore } from '../../stores/zine/articles' import { useSeenStore } from '../../stores/zine/seen' type FeedSidebarProps = { authors: Author[] } export const FeedSidebar = (props: FeedSidebarProps) => { const { getSeen: seen } = useSeenStore() const { session } = useAuthStore() const { authorEntities } = useAuthorsStore({ authors: props.authors }) const { articlesByTopic } = useArticlesStore() const { topicEntities } = useTopicsStore() const checkTopicIsSeen = (topicSlug: string) => { return articlesByTopic()[topicSlug].every((article) => Boolean(seen()[article.slug])) } const checkAuthorIsSeen = (authorSlug: string) => { return Boolean(seen()[authorSlug]) } return ( <>
{t('Feed settings')}
) }