diff --git a/astro.config.ts b/astro.config.ts index c55017c3..c2ca1005 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -1,7 +1,7 @@ import { defineConfig, AstroUserConfig } from 'astro/config' import vercel from '@astrojs/vercel/serverless' import solidJs from '@astrojs/solid-js' -import type { CSSOptions, PluginOption } from 'vite' +import type { CSSOptions } from 'vite' import defaultGenerateScopedName from 'postcss-modules/build/generateScopedName' import { isDev } from './src/utils/config' import { visualizer } from 'rollup-plugin-visualizer' diff --git a/src/components/Views/AllAuthors.tsx b/src/components/Views/AllAuthors.tsx index af2c5714..30e1b878 100644 --- a/src/components/Views/AllAuthors.tsx +++ b/src/components/Views/AllAuthors.tsx @@ -1,7 +1,6 @@ import { createEffect, createMemo, createSignal, For, Show } from 'solid-js' import type { Author } from '../../graphql/types.gen' import { AuthorCard } from '../Author/Card' -import { Icon } from '../_shared/Icon' import { t } from '../../utils/intl' import { useAuthorsStore, setAuthorsSort } from '../../stores/zine/authors' import { useRouter } from '../../stores/router' diff --git a/src/components/Views/Article.tsx b/src/components/Views/Article.tsx index f5d729c5..84c24f41 100644 --- a/src/components/Views/Article.tsx +++ b/src/components/Views/Article.tsx @@ -16,14 +16,7 @@ const ARTICLE_COMMENTS_PAGE_SIZE = 50 export const ArticleView = (props: ArticlePageProps) => { const [getCommentsPage] = createSignal(1) const [getIsCommentsLoading, setIsCommentsLoading] = createSignal(false) - const { - reactionsByShout, - sortedReactions, - createReaction, - updateReaction, - deleteReaction, - loadReactionsBy - } = useReactionsStore({ reactions: props.reactions }) + const { reactionsByShout, loadReactionsBy } = useReactionsStore({ reactions: props.reactions }) createEffect(async () => { try { diff --git a/src/components/Views/Feed.tsx b/src/components/Views/Feed.tsx index c4d481fe..57c5bb3e 100644 --- a/src/components/Views/Feed.tsx +++ b/src/components/Views/Feed.tsx @@ -1,4 +1,4 @@ -import { createEffect, createSignal, For, onMount, Show } from 'solid-js' +import { createSignal, For, onMount, Show } from 'solid-js' import '../../styles/Feed.scss' import stylesBeside from '../../components/Feed/Beside.module.scss' import { Icon } from '../_shared/Icon' @@ -14,15 +14,14 @@ import { useAuthorsStore } from '../../stores/zine/authors' import { useTopicsStore } from '../../stores/zine/topics' import { useTopAuthorsStore } from '../../stores/zine/topAuthors' import { useSession } from '../../context/session' -import { Collab, ReactionKind, Shout } from '../../graphql/types.gen' -import { collabs, setCollabs } from '../../stores/editor' +import type { Shout } from '../../graphql/types.gen' -const AUTHORSHIP_REACTIONS = [ - ReactionKind.Accept, - ReactionKind.Reject, - ReactionKind.Propose, - ReactionKind.Ask -] +// const AUTHORSHIP_REACTIONS = [ +// ReactionKind.Accept, +// ReactionKind.Reject, +// ReactionKind.Propose, +// ReactionKind.Ask +// ] export const FEED_PAGE_SIZE = 20 @@ -57,15 +56,10 @@ export const FeedView = () => { // load recent editing shouts ( visibility = authors ) const userslug = session().user.slug - await loadShouts({ filters: { author: userslug, visibility: 'authors' }, limit: 15, offset: 0 }) - const collaborativeShouts = sortedArticles().filter((s: Shout, n: number, arr: Shout[]) => { - if (s.visibility !== 'authors') { - arr.splice(n, 1) - return arr - } - }) + await loadShouts({ filters: { author: userslug, visibility: 'authors' }, limit: 15 }) + const collaborativeShouts = sortedArticles().filter((shout) => shout.visibility === 'authors') // load recent reactions on collabs - await loadReactionsBy({ by: { shouts: [...collaborativeShouts], body: true }, limit: 5, offset: 0 }) + await loadReactionsBy({ by: { shouts: [...collaborativeShouts], body: true }, limit: 5 }) }) return ( diff --git a/src/graphql/publicGraphQLClient.ts b/src/graphql/publicGraphQLClient.ts index 13c97c16..50dec0c7 100644 --- a/src/graphql/publicGraphQLClient.ts +++ b/src/graphql/publicGraphQLClient.ts @@ -1,7 +1,7 @@ import { ClientOptions, dedupExchange, fetchExchange, Exchange, createClient } from '@urql/core' import { devtoolsExchange } from '@urql/devtools' import { isDev, apiBaseUrl } from '../utils/config' -import { cache } from './cache' +// import { cache } from './cache' const exchanges: Exchange[] = [dedupExchange, fetchExchange] //, cache] diff --git a/src/stores/zine/reactions.ts b/src/stores/zine/reactions.ts index 784136fa..4e4bfd06 100644 --- a/src/stores/zine/reactions.ts +++ b/src/stores/zine/reactions.ts @@ -1,4 +1,4 @@ -import type { Reaction, Shout } from '../../graphql/types.gen' +import type { Reaction } from '../../graphql/types.gen' import { apiClient } from '../../utils/apiClient' import { createSignal } from 'solid-js' // TODO: import { roomConnect } from '../../utils/p2p' diff --git a/src/styles/AllTopics.module.scss b/src/styles/AllTopics.module.scss index b3af4141..02decc7f 100644 --- a/src/styles/AllTopics.module.scss +++ b/src/styles/AllTopics.module.scss @@ -1,6 +1,7 @@ .allTopicsPage { .group { @include font-size(1.6rem); + margin: 3em 0 9.6rem; @include media-breakpoint-down(sm) { @@ -50,7 +51,7 @@ } .alphabet { - color: rgba(0, 0, 0, 0.2); + color: rgba(0 0 0 / 20%); display: flex; flex-wrap: wrap; font-weight: 700;