lint
This commit is contained in:
parent
c1cc1a3ad9
commit
382d420f38
|
@ -1,7 +1,7 @@
|
||||||
import { defineConfig, AstroUserConfig } from 'astro/config'
|
import { defineConfig, AstroUserConfig } from 'astro/config'
|
||||||
import vercel from '@astrojs/vercel/serverless'
|
import vercel from '@astrojs/vercel/serverless'
|
||||||
import solidJs from '@astrojs/solid-js'
|
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 defaultGenerateScopedName from 'postcss-modules/build/generateScopedName'
|
||||||
import { isDev } from './src/utils/config'
|
import { isDev } from './src/utils/config'
|
||||||
import { visualizer } from 'rollup-plugin-visualizer'
|
import { visualizer } from 'rollup-plugin-visualizer'
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { createEffect, createMemo, createSignal, For, Show } from 'solid-js'
|
import { createEffect, createMemo, createSignal, For, Show } from 'solid-js'
|
||||||
import type { Author } from '../../graphql/types.gen'
|
import type { Author } from '../../graphql/types.gen'
|
||||||
import { AuthorCard } from '../Author/Card'
|
import { AuthorCard } from '../Author/Card'
|
||||||
import { Icon } from '../_shared/Icon'
|
|
||||||
import { t } from '../../utils/intl'
|
import { t } from '../../utils/intl'
|
||||||
import { useAuthorsStore, setAuthorsSort } from '../../stores/zine/authors'
|
import { useAuthorsStore, setAuthorsSort } from '../../stores/zine/authors'
|
||||||
import { useRouter } from '../../stores/router'
|
import { useRouter } from '../../stores/router'
|
||||||
|
|
|
@ -16,14 +16,7 @@ const ARTICLE_COMMENTS_PAGE_SIZE = 50
|
||||||
export const ArticleView = (props: ArticlePageProps) => {
|
export const ArticleView = (props: ArticlePageProps) => {
|
||||||
const [getCommentsPage] = createSignal(1)
|
const [getCommentsPage] = createSignal(1)
|
||||||
const [getIsCommentsLoading, setIsCommentsLoading] = createSignal(false)
|
const [getIsCommentsLoading, setIsCommentsLoading] = createSignal(false)
|
||||||
const {
|
const { reactionsByShout, loadReactionsBy } = useReactionsStore({ reactions: props.reactions })
|
||||||
reactionsByShout,
|
|
||||||
sortedReactions,
|
|
||||||
createReaction,
|
|
||||||
updateReaction,
|
|
||||||
deleteReaction,
|
|
||||||
loadReactionsBy
|
|
||||||
} = useReactionsStore({ reactions: props.reactions })
|
|
||||||
|
|
||||||
createEffect(async () => {
|
createEffect(async () => {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -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 '../../styles/Feed.scss'
|
||||||
import stylesBeside from '../../components/Feed/Beside.module.scss'
|
import stylesBeside from '../../components/Feed/Beside.module.scss'
|
||||||
import { Icon } from '../_shared/Icon'
|
import { Icon } from '../_shared/Icon'
|
||||||
|
@ -14,15 +14,14 @@ import { useAuthorsStore } from '../../stores/zine/authors'
|
||||||
import { useTopicsStore } from '../../stores/zine/topics'
|
import { useTopicsStore } from '../../stores/zine/topics'
|
||||||
import { useTopAuthorsStore } from '../../stores/zine/topAuthors'
|
import { useTopAuthorsStore } from '../../stores/zine/topAuthors'
|
||||||
import { useSession } from '../../context/session'
|
import { useSession } from '../../context/session'
|
||||||
import { Collab, ReactionKind, Shout } from '../../graphql/types.gen'
|
import type { Shout } from '../../graphql/types.gen'
|
||||||
import { collabs, setCollabs } from '../../stores/editor'
|
|
||||||
|
|
||||||
const AUTHORSHIP_REACTIONS = [
|
// const AUTHORSHIP_REACTIONS = [
|
||||||
ReactionKind.Accept,
|
// ReactionKind.Accept,
|
||||||
ReactionKind.Reject,
|
// ReactionKind.Reject,
|
||||||
ReactionKind.Propose,
|
// ReactionKind.Propose,
|
||||||
ReactionKind.Ask
|
// ReactionKind.Ask
|
||||||
]
|
// ]
|
||||||
|
|
||||||
export const FEED_PAGE_SIZE = 20
|
export const FEED_PAGE_SIZE = 20
|
||||||
|
|
||||||
|
@ -57,15 +56,10 @@ export const FeedView = () => {
|
||||||
|
|
||||||
// load recent editing shouts ( visibility = authors )
|
// load recent editing shouts ( visibility = authors )
|
||||||
const userslug = session().user.slug
|
const userslug = session().user.slug
|
||||||
await loadShouts({ filters: { author: userslug, visibility: 'authors' }, limit: 15, offset: 0 })
|
await loadShouts({ filters: { author: userslug, visibility: 'authors' }, limit: 15 })
|
||||||
const collaborativeShouts = sortedArticles().filter((s: Shout, n: number, arr: Shout[]) => {
|
const collaborativeShouts = sortedArticles().filter((shout) => shout.visibility === 'authors')
|
||||||
if (s.visibility !== 'authors') {
|
|
||||||
arr.splice(n, 1)
|
|
||||||
return arr
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// load recent reactions on collabs
|
// 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 (
|
return (
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { ClientOptions, dedupExchange, fetchExchange, Exchange, createClient } from '@urql/core'
|
import { ClientOptions, dedupExchange, fetchExchange, Exchange, createClient } from '@urql/core'
|
||||||
import { devtoolsExchange } from '@urql/devtools'
|
import { devtoolsExchange } from '@urql/devtools'
|
||||||
import { isDev, apiBaseUrl } from '../utils/config'
|
import { isDev, apiBaseUrl } from '../utils/config'
|
||||||
import { cache } from './cache'
|
// import { cache } from './cache'
|
||||||
|
|
||||||
const exchanges: Exchange[] = [dedupExchange, fetchExchange] //, cache]
|
const exchanges: Exchange[] = [dedupExchange, fetchExchange] //, cache]
|
||||||
|
|
||||||
|
|
|
@ -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 { apiClient } from '../../utils/apiClient'
|
||||||
import { createSignal } from 'solid-js'
|
import { createSignal } from 'solid-js'
|
||||||
// TODO: import { roomConnect } from '../../utils/p2p'
|
// TODO: import { roomConnect } from '../../utils/p2p'
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
.allTopicsPage {
|
.allTopicsPage {
|
||||||
.group {
|
.group {
|
||||||
@include font-size(1.6rem);
|
@include font-size(1.6rem);
|
||||||
|
|
||||||
margin: 3em 0 9.6rem;
|
margin: 3em 0 9.6rem;
|
||||||
|
|
||||||
@include media-breakpoint-down(sm) {
|
@include media-breakpoint-down(sm) {
|
||||||
|
@ -50,7 +51,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.alphabet {
|
.alphabet {
|
||||||
color: rgba(0, 0, 0, 0.2);
|
color: rgba(0 0 0 / 20%);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user