Merge pull request #438 from Discours/hotfix/provile-dala-load
Load user profile
This commit is contained in:
commit
bb7d289ff7
2
.github/workflows/node-ci.yml
vendored
2
.github/workflows/node-ci.yml
vendored
|
@ -16,7 +16,7 @@ jobs:
|
||||||
run: npm run typecheck
|
run: npm run typecheck
|
||||||
|
|
||||||
- name: Lint with Biome
|
- name: Lint with Biome
|
||||||
run: npx biome ci .
|
run: npm run check:code
|
||||||
|
|
||||||
- name: Lint styles
|
- name: Lint styles
|
||||||
run: npm run lint:styles
|
run: npm run lint:styles
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
|
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
|
||||||
"files": {
|
"files": {
|
||||||
"include": ["*.tsx", "*.ts", "*.js", "*.json"],
|
"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": {
|
"vcs": {
|
||||||
"defaultBranch": "dev",
|
"defaultBranch": "dev",
|
||||||
|
|
|
@ -54,15 +54,16 @@ export const AuthorView = (props: Props) => {
|
||||||
const modal = MODALS[searchParams().m]
|
const modal = MODALS[searchParams().m]
|
||||||
|
|
||||||
// current author
|
// current author
|
||||||
|
createEffect(async () => {
|
||||||
|
await loadAuthor({ slug: props.authorSlug })
|
||||||
|
})
|
||||||
createEffect(() => {
|
createEffect(() => {
|
||||||
if (props.authorSlug) {
|
if (props.authorSlug && session()?.user?.app_data?.profile?.slug === props.authorSlug) {
|
||||||
if (session()?.user?.app_data?.profile?.slug === props.authorSlug) {
|
|
||||||
console.info('my own profile')
|
console.info('my own profile')
|
||||||
const { profile, authors, topics } = session().user.app_data
|
const { profile, authors, topics } = session().user.app_data
|
||||||
setFollowers(myFollowers)
|
setFollowers(myFollowers)
|
||||||
setAuthor(profile)
|
setAuthor(profile)
|
||||||
setFollowing([...authors, ...topics])
|
setFollowing([...authors, ...topics])
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
const a = authorEntities()[props.authorSlug]
|
const a = authorEntities()[props.authorSlug]
|
||||||
|
|
|
@ -49,17 +49,15 @@ export const ImageSwiper = (props: Props) => {
|
||||||
)
|
)
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
console.log("!!! onMount:");
|
|
||||||
const { register } = await import('swiper/element/bundle')
|
const { register } = await import('swiper/element/bundle')
|
||||||
register()
|
register()
|
||||||
SwiperCore.use([Pagination, Navigation, Manipulation])
|
SwiperCore.use([Pagination, Navigation, Manipulation])
|
||||||
while (!mainSwipeRef.current || !mainSwipeRef.current.swiper) {
|
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(() => {
|
onMount(() => {
|
||||||
const updateDirection = () => {
|
const updateDirection = () => {
|
||||||
const width = window.innerWidth
|
const width = window.innerWidth
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { createLazyMemo } from '@solid-primitives/memo'
|
import { createLazyMemo } from '@solid-primitives/memo'
|
||||||
import { createSignal } from 'solid-js'
|
import { createEffect, createSignal } from 'solid-js'
|
||||||
|
|
||||||
import { apiClient } from '../../graphql/client/core'
|
import { apiClient } from '../../graphql/client/core'
|
||||||
import { Author, QueryLoad_Authors_ByArgs } from '../../graphql/schema/core.gen'
|
import { Author, QueryLoad_Authors_ByArgs } from '../../graphql/schema/core.gen'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user