diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 2d2d4bc8..1220b122 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -16,7 +16,7 @@ jobs: run: npm run typecheck - name: Lint with Biome - run: npx biome ci . + run: npm run check:code - name: Lint styles run: npm run lint:styles diff --git a/biome.json b/biome.json index ba7464a5..ca4262bb 100644 --- a/biome.json +++ b/biome.json @@ -2,7 +2,7 @@ "$schema": "https://biomejs.dev/schemas/1.5.3/schema.json", "files": { "include": ["*.tsx", "*.ts", "*.js", "*.json"], - "ignore": ["./dist", "./node_modules", ".husky", "docs", "gen", "*.d.ts"] + "ignore": ["./dist", "./node_modules", ".husky", "docs", "gen", "*.gen.ts", "*.d.ts"] }, "vcs": { "defaultBranch": "dev", diff --git a/src/components/Views/Author/Author.tsx b/src/components/Views/Author/Author.tsx index 0c6a958a..870d4e5c 100644 --- a/src/components/Views/Author/Author.tsx +++ b/src/components/Views/Author/Author.tsx @@ -54,15 +54,16 @@ export const AuthorView = (props: Props) => { const modal = MODALS[searchParams().m] // current author + createEffect(async () => { + await loadAuthor({ slug: props.authorSlug }) + }) createEffect(() => { - if (props.authorSlug) { - if (session()?.user?.app_data?.profile?.slug === props.authorSlug) { - console.info('my own profile') - const { profile, authors, topics } = session().user.app_data - setFollowers(myFollowers) - setAuthor(profile) - setFollowing([...authors, ...topics]) - } + if (props.authorSlug && session()?.user?.app_data?.profile?.slug === props.authorSlug) { + console.info('my own profile') + const { profile, authors, topics } = session().user.app_data + setFollowers(myFollowers) + setAuthor(profile) + setFollowing([...authors, ...topics]) } else { try { const a = authorEntities()[props.authorSlug] diff --git a/src/components/_shared/SolidSwiper/ImageSwiper.tsx b/src/components/_shared/SolidSwiper/ImageSwiper.tsx index d018632c..888a23c3 100644 --- a/src/components/_shared/SolidSwiper/ImageSwiper.tsx +++ b/src/components/_shared/SolidSwiper/ImageSwiper.tsx @@ -49,17 +49,15 @@ export const ImageSwiper = (props: Props) => { ) onMount(async () => { - console.log("!!! onMount:"); const { register } = await import('swiper/element/bundle') register() SwiperCore.use([Pagination, Navigation, Manipulation]) while (!mainSwipeRef.current || !mainSwipeRef.current.swiper) { - await new Promise(resolve => setTimeout(resolve, 10)); // wait 10 ms + await new Promise((resolve) => setTimeout(resolve, 10)) // wait 10 ms } - mainSwipeRef.current.swiper.on('slideChange', handleSlideChange); + mainSwipeRef.current.swiper.on('slideChange', handleSlideChange) }) - onMount(() => { const updateDirection = () => { const width = window.innerWidth diff --git a/src/stores/zine/authors.ts b/src/stores/zine/authors.ts index 131b70c6..2253b84e 100644 --- a/src/stores/zine/authors.ts +++ b/src/stores/zine/authors.ts @@ -1,5 +1,5 @@ import { createLazyMemo } from '@solid-primitives/memo' -import { createSignal } from 'solid-js' +import { createEffect, createSignal } from 'solid-js' import { apiClient } from '../../graphql/client/core' import { Author, QueryLoad_Authors_ByArgs } from '../../graphql/schema/core.gen'