diff --git a/src/components/Author/AuthorBadge/AuthorBadge.tsx b/src/components/Author/AuthorBadge/AuthorBadge.tsx index 80e32c73..39624854 100644 --- a/src/components/Author/AuthorBadge/AuthorBadge.tsx +++ b/src/components/Author/AuthorBadge/AuthorBadge.tsx @@ -42,10 +42,9 @@ export const AuthorBadge = (props: Props) => { } = useSession() const { changeSearchParams } = useRouter() const { t, formatDate, lang } = useLocalize() - const subscribed = createMemo(() => { - let sss = subscriptions() - return sss?.authors.some((a: Author) => a?.slug === props.author.slug) - }) + const subscribed = createMemo( + () => subscriptions()?.authors.some((a: Author) => a?.slug === props.author.slug), + ) const subscribe = async (really = true) => { setIsSubscribing(true) diff --git a/src/components/Topic/TopicBadge/TopicBadge.tsx b/src/components/Topic/TopicBadge/TopicBadge.tsx index 4159da6d..baa410b6 100644 --- a/src/components/Topic/TopicBadge/TopicBadge.tsx +++ b/src/components/Topic/TopicBadge/TopicBadge.tsx @@ -6,14 +6,12 @@ import { useMediaQuery } from '../../../context/mediaQuery' import { useSession } from '../../../context/session' import { FollowingEntity, Topic } from '../../../graphql/schema/core.gen' import { follow, unfollow } from '../../../stores/zine/common' +import { capitalize } from '../../../utils/capitalize' import { getImageUrl } from '../../../utils/getImageUrl' import { Button } from '../../_shared/Button' import { CheckButton } from '../../_shared/CheckButton' import styles from './TopicBadge.module.scss' -import { title } from 'process' -import { capitalize } from '../../../utils/capitalize' - type Props = { topic: Topic minimizeSubscribeButton?: boolean