Merge pull request #435 from Discours/feature/session-upgrade
app-data-author
This commit is contained in:
commit
66ed666b90
|
@ -16,7 +16,7 @@
|
||||||
"hygen": "HYGEN_TMPLS=gen hygen",
|
"hygen": "HYGEN_TMPLS=gen hygen",
|
||||||
"postinstall": "npm run codegen && npx patch-package",
|
"postinstall": "npm run codegen && npx patch-package",
|
||||||
"check:code": "npx @biomejs/biome check src --log-kind=compact --verbose",
|
"check:code": "npx @biomejs/biome check src --log-kind=compact --verbose",
|
||||||
"check:code:fix": "npx @biomejs/biome check src --log-kind=compact --verbose --apply-unsafe",
|
"check:code:fix": "npx @biomejs/biome check src --log-kind=compact",
|
||||||
"lint": "npm run lint:code && stylelint **/*.{scss,css}",
|
"lint": "npm run lint:code && stylelint **/*.{scss,css}",
|
||||||
"lint:code": "npx @biomejs/biome lint src --log-kind=compact --verbose",
|
"lint:code": "npx @biomejs/biome lint src --log-kind=compact --verbose",
|
||||||
"lint:code:fix": "npx @biomejs/biome lint src --apply-unsafe --log-kind=compact --verbose",
|
"lint:code:fix": "npx @biomejs/biome lint src --apply-unsafe --log-kind=compact --verbose",
|
||||||
|
|
|
@ -134,7 +134,9 @@ export const AuthorCard = (props: Props) => {
|
||||||
)}
|
)}
|
||||||
</For>
|
</For>
|
||||||
<div class={styles.subscribersCounter}>
|
<div class={styles.subscribersCounter}>
|
||||||
{t('SubscriberWithCount', { count: props.followers.length ?? 0 })}
|
{t('SubscriberWithCount', {
|
||||||
|
count: props.followers.length ?? 0,
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</Show>
|
</Show>
|
||||||
|
@ -169,7 +171,9 @@ export const AuthorCard = (props: Props) => {
|
||||||
}}
|
}}
|
||||||
</For>
|
</For>
|
||||||
<div class={styles.subscribersCounter}>
|
<div class={styles.subscribersCounter}>
|
||||||
{t('SubscriptionWithCount', { count: props?.following.length ?? 0 })}
|
{t('SubscriptionWithCount', {
|
||||||
|
count: props?.following.length ?? 0,
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</Show>
|
</Show>
|
||||||
|
@ -234,7 +238,9 @@ export const AuthorCard = (props: Props) => {
|
||||||
title={props.author.name}
|
title={props.author.name}
|
||||||
description={props.author.bio}
|
description={props.author.bio}
|
||||||
imageUrl={props.author.pic}
|
imageUrl={props.author.pic}
|
||||||
shareUrl={getShareUrl({ pathname: `/author/${props.author.slug}` })}
|
shareUrl={getShareUrl({
|
||||||
|
pathname: `/author/${props.author.slug}`,
|
||||||
|
})}
|
||||||
trigger={<Button variant="secondary" value={t('Share')} />}
|
trigger={<Button variant="secondary" value={t('Share')} />}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -270,13 +276,21 @@ export const AuthorCard = (props: Props) => {
|
||||||
<>
|
<>
|
||||||
<h2>{t('Subscriptions')}</h2>
|
<h2>{t('Subscriptions')}</h2>
|
||||||
<ul class="view-switcher">
|
<ul class="view-switcher">
|
||||||
<li class={clsx({ 'view-switcher__item--selected': subscriptionFilter() === 'all' })}>
|
<li
|
||||||
|
class={clsx({
|
||||||
|
'view-switcher__item--selected': subscriptionFilter() === 'all',
|
||||||
|
})}
|
||||||
|
>
|
||||||
<button type="button" onClick={() => setSubscriptionFilter('all')}>
|
<button type="button" onClick={() => setSubscriptionFilter('all')}>
|
||||||
{t('All')}
|
{t('All')}
|
||||||
</button>
|
</button>
|
||||||
<span class="view-switcher__counter">{props.following.length}</span>
|
<span class="view-switcher__counter">{props.following.length}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class={clsx({ 'view-switcher__item--selected': subscriptionFilter() === 'authors' })}>
|
<li
|
||||||
|
class={clsx({
|
||||||
|
'view-switcher__item--selected': subscriptionFilter() === 'authors',
|
||||||
|
})}
|
||||||
|
>
|
||||||
<button type="button" onClick={() => setSubscriptionFilter('authors')}>
|
<button type="button" onClick={() => setSubscriptionFilter('authors')}>
|
||||||
{t('Authors')}
|
{t('Authors')}
|
||||||
</button>
|
</button>
|
||||||
|
@ -284,7 +298,11 @@ export const AuthorCard = (props: Props) => {
|
||||||
{props.following.filter((s) => 'name' in s).length}
|
{props.following.filter((s) => 'name' in s).length}
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<li class={clsx({ 'view-switcher__item--selected': subscriptionFilter() === 'topics' })}>
|
<li
|
||||||
|
class={clsx({
|
||||||
|
'view-switcher__item--selected': subscriptionFilter() === 'topics',
|
||||||
|
})}
|
||||||
|
>
|
||||||
<button type="button" onClick={() => setSubscriptionFilter('topics')}>
|
<button type="button" onClick={() => setSubscriptionFilter('topics')}>
|
||||||
{t('Topics')}
|
{t('Topics')}
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -7,6 +7,7 @@ import { For, Match, Show, Switch, createEffect, createMemo, createSignal, onMou
|
||||||
|
|
||||||
import { useFollowing } from '../../../context/following'
|
import { useFollowing } from '../../../context/following'
|
||||||
import { useLocalize } from '../../../context/localize'
|
import { useLocalize } from '../../../context/localize'
|
||||||
|
import { useSession } from '../../../context/session'
|
||||||
import { apiClient } from '../../../graphql/client/core'
|
import { apiClient } from '../../../graphql/client/core'
|
||||||
import { router, useRouter } from '../../../stores/router'
|
import { router, useRouter } from '../../../stores/router'
|
||||||
import { loadShouts, useArticlesStore } from '../../../stores/zine/articles'
|
import { loadShouts, useArticlesStore } from '../../../stores/zine/articles'
|
||||||
|
@ -30,32 +31,47 @@ import styles from './Author.module.scss'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
authorSlug: string
|
authorSlug: string
|
||||||
|
shouts?: Shout[]
|
||||||
|
author?: Author
|
||||||
}
|
}
|
||||||
export const PRERENDERED_ARTICLES_COUNT = 12
|
export const PRERENDERED_ARTICLES_COUNT = 12
|
||||||
const LOAD_MORE_PAGE_SIZE = 9
|
const LOAD_MORE_PAGE_SIZE = 9
|
||||||
|
|
||||||
export const AuthorView = (props: Props) => {
|
export const AuthorView = (props: Props) => {
|
||||||
const { t } = useLocalize()
|
const { t } = useLocalize()
|
||||||
const { loadSubscriptions } = useFollowing()
|
const { subscriptions, followers: myFollowers, loadSubscriptions } = useFollowing()
|
||||||
const { sortedArticles } = useArticlesStore()
|
const { session } = useSession()
|
||||||
const { authorEntities } = useAuthorsStore()
|
const { sortedArticles } = useArticlesStore({ shouts: props.shouts })
|
||||||
|
const { authorEntities } = useAuthorsStore({ authors: [props.author] })
|
||||||
const { page: getPage, searchParams } = useRouter()
|
const { page: getPage, searchParams } = useRouter()
|
||||||
const [isLoadMoreButtonVisible, setIsLoadMoreButtonVisible] = createSignal(false)
|
const [isLoadMoreButtonVisible, setIsLoadMoreButtonVisible] = createSignal(false)
|
||||||
const [isBioExpanded, setIsBioExpanded] = createSignal(false)
|
const [isBioExpanded, setIsBioExpanded] = createSignal(false)
|
||||||
const [followers, setFollowers] = createSignal<Author[]>([])
|
const [author, setAuthor] = createSignal<Author>()
|
||||||
const [following, setFollowing] = createSignal<Array<Author | Topic>>([])
|
const [followers, setFollowers] = createSignal([])
|
||||||
|
const [following, setFollowing] = createSignal<Array<Author | Topic>>([]) // flat AuthorFollowsResult
|
||||||
const [showExpandBioControl, setShowExpandBioControl] = createSignal(false)
|
const [showExpandBioControl, setShowExpandBioControl] = createSignal(false)
|
||||||
const [commented, setCommented] = createSignal<Reaction[]>()
|
const [commented, setCommented] = createSignal<Reaction[]>()
|
||||||
const modal = MODALS[searchParams().m]
|
const modal = MODALS[searchParams().m]
|
||||||
|
|
||||||
// current author
|
// current author
|
||||||
const [author, setAuthor] = createSignal<Author>()
|
|
||||||
createEffect(() => {
|
createEffect(() => {
|
||||||
try {
|
if (props.authorSlug) {
|
||||||
const a = authorEntities()[props.authorSlug]
|
if (session()?.user?.app_data?.profile?.slug === props.authorSlug) {
|
||||||
setAuthor(a)
|
console.info('my own profile')
|
||||||
} catch (error) {
|
const { profile, authors, topics } = session().user.app_data
|
||||||
console.debug(error)
|
setFollowers(myFollowers)
|
||||||
|
setAuthor(profile)
|
||||||
|
setFollowing([...authors, ...topics])
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
const a = authorEntities()[props.authorSlug]
|
||||||
|
setAuthor(a)
|
||||||
|
// TODO: add following data retrieval
|
||||||
|
console.debug('[Author] expecting following data fetched')
|
||||||
|
} catch (error) {
|
||||||
|
console.debug(error)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -166,31 +182,53 @@ export const AuthorView = (props: Props) => {
|
||||||
<Show when={author()} fallback={<Loading />}>
|
<Show when={author()} fallback={<Loading />}>
|
||||||
<>
|
<>
|
||||||
<div class={styles.authorHeader}>
|
<div class={styles.authorHeader}>
|
||||||
<AuthorCard author={author()} followers={followers()} following={following()} />
|
<AuthorCard author={author()} followers={followers() || []} following={following() || []} />
|
||||||
</div>
|
</div>
|
||||||
<div class={clsx(styles.groupControls, 'row')}>
|
<div class={clsx(styles.groupControls, 'row')}>
|
||||||
<div class="col-md-16">
|
<div class="col-md-16">
|
||||||
<ul class="view-switcher">
|
<ul class="view-switcher">
|
||||||
<li classList={{ 'view-switcher__item--selected': getPage().route === 'author' }}>
|
<li
|
||||||
<a href={getPagePath(router, 'author', { slug: props.authorSlug })}>
|
classList={{
|
||||||
|
'view-switcher__item--selected': getPage().route === 'author',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<a
|
||||||
|
href={getPagePath(router, 'author', {
|
||||||
|
slug: props.authorSlug,
|
||||||
|
})}
|
||||||
|
>
|
||||||
{t('Publications')}
|
{t('Publications')}
|
||||||
</a>
|
</a>
|
||||||
<Show when={author().stat}>
|
<Show when={author().stat}>
|
||||||
<span class="view-switcher__counter">{author().stat.shouts}</span>
|
<span class="view-switcher__counter">{author().stat.shouts}</span>
|
||||||
</Show>
|
</Show>
|
||||||
</li>
|
</li>
|
||||||
<li classList={{ 'view-switcher__item--selected': getPage().route === 'authorComments' }}>
|
<li
|
||||||
<a href={getPagePath(router, 'authorComments', { slug: props.authorSlug })}>
|
classList={{
|
||||||
|
'view-switcher__item--selected': getPage().route === 'authorComments',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<a
|
||||||
|
href={getPagePath(router, 'authorComments', {
|
||||||
|
slug: props.authorSlug,
|
||||||
|
})}
|
||||||
|
>
|
||||||
{t('Comments')}
|
{t('Comments')}
|
||||||
</a>
|
</a>
|
||||||
<Show when={author().stat}>
|
<Show when={author().stat}>
|
||||||
<span class="view-switcher__counter">{author().stat.comments}</span>
|
<span class="view-switcher__counter">{author().stat.comments}</span>
|
||||||
</Show>
|
</Show>
|
||||||
</li>
|
</li>
|
||||||
<li classList={{ 'view-switcher__item--selected': getPage().route === 'authorAbout' }}>
|
<li
|
||||||
|
classList={{
|
||||||
|
'view-switcher__item--selected': getPage().route === 'authorAbout',
|
||||||
|
}}
|
||||||
|
>
|
||||||
<a
|
<a
|
||||||
onClick={() => checkBioHeight()}
|
onClick={() => checkBioHeight()}
|
||||||
href={getPagePath(router, 'authorAbout', { slug: props.authorSlug })}
|
href={getPagePath(router, 'authorAbout', {
|
||||||
|
slug: props.authorSlug,
|
||||||
|
})}
|
||||||
>
|
>
|
||||||
{t('Profile')}
|
{t('Profile')}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { clsx } from 'clsx'
|
import { clsx } from 'clsx'
|
||||||
import { For, Show, createEffect, createSignal, onMount } from 'solid-js'
|
import { For, Show, createEffect, createSignal, onMount } from 'solid-js'
|
||||||
|
|
||||||
|
import { useFollowing } from '../../../context/following'
|
||||||
import { useLocalize } from '../../../context/localize'
|
import { useLocalize } from '../../../context/localize'
|
||||||
import { useSession } from '../../../context/session'
|
import { useSession } from '../../../context/session'
|
||||||
import { apiClient } from '../../../graphql/client/core'
|
import { apiClient } from '../../../graphql/client/core'
|
||||||
|
@ -20,41 +21,32 @@ import stylesSettings from '../../../styles/FeedSettings.module.scss'
|
||||||
|
|
||||||
export const ProfileSubscriptions = () => {
|
export const ProfileSubscriptions = () => {
|
||||||
const { t, lang } = useLocalize()
|
const { t, lang } = useLocalize()
|
||||||
const { author } = useSession()
|
const { author, session } = useSession()
|
||||||
|
const { subscriptions } = useFollowing()
|
||||||
const [following, setFollowing] = createSignal<Array<Author | Topic>>([])
|
const [following, setFollowing] = createSignal<Array<Author | Topic>>([])
|
||||||
const [filtered, setFiltered] = createSignal<Array<Author | Topic>>([])
|
const [filtered, setFiltered] = createSignal<Array<Author | Topic>>([])
|
||||||
const [subscriptionFilter, setSubscriptionFilter] = createSignal<SubscriptionFilter>('all')
|
const [subscriptionFilter, setSubscriptionFilter] = createSignal<SubscriptionFilter>('all')
|
||||||
const [searchQuery, setSearchQuery] = createSignal('')
|
const [searchQuery, setSearchQuery] = createSignal('')
|
||||||
|
|
||||||
const fetchSubscriptions = async () => {
|
|
||||||
try {
|
|
||||||
const slug = author()?.slug
|
|
||||||
const authorFollows = await apiClient.getAuthorFollows({ slug })
|
|
||||||
setFollowing([...authorFollows['authors']])
|
|
||||||
setFiltered([...authorFollows['authors'], ...authorFollows['topics']])
|
|
||||||
} catch (error) {
|
|
||||||
console.error('[fetchSubscriptions] :', error)
|
|
||||||
throw error
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
createEffect(() => {
|
createEffect(() => {
|
||||||
if (following()) {
|
const { authors, topics } = subscriptions
|
||||||
|
if (authors || topics) {
|
||||||
|
const fdata = [...(authors || []), ...(topics || [])]
|
||||||
|
setFollowing(fdata)
|
||||||
if (subscriptionFilter() === 'authors') {
|
if (subscriptionFilter() === 'authors') {
|
||||||
setFiltered(following().filter((s) => 'name' in s))
|
setFiltered(fdata.filter((s) => 'name' in s))
|
||||||
} else if (subscriptionFilter() === 'topics') {
|
} else if (subscriptionFilter() === 'topics') {
|
||||||
setFiltered(following().filter((s) => 'title' in s))
|
setFiltered(fdata.filter((s) => 'title' in s))
|
||||||
} else {
|
} else {
|
||||||
setFiltered(following())
|
setFiltered(fdata)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (searchQuery()) {
|
|
||||||
setFiltered(dummyFilter(following(), searchQuery(), lang()))
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
onMount(async () => {
|
createEffect(() => {
|
||||||
await fetchSubscriptions()
|
if (searchQuery()) {
|
||||||
|
setFiltered(dummyFilter(following(), searchQuery(), lang()))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -73,17 +65,29 @@ export const ProfileSubscriptions = () => {
|
||||||
<p class="description">{t('Here you can manage all your Discours subscriptions')}</p>
|
<p class="description">{t('Here you can manage all your Discours subscriptions')}</p>
|
||||||
<Show when={following()} fallback={<Loading />}>
|
<Show when={following()} fallback={<Loading />}>
|
||||||
<ul class="view-switcher">
|
<ul class="view-switcher">
|
||||||
<li class={clsx({ 'view-switcher__item--selected': subscriptionFilter() === 'all' })}>
|
<li
|
||||||
|
class={clsx({
|
||||||
|
'view-switcher__item--selected': subscriptionFilter() === 'all',
|
||||||
|
})}
|
||||||
|
>
|
||||||
<button type="button" onClick={() => setSubscriptionFilter('all')}>
|
<button type="button" onClick={() => setSubscriptionFilter('all')}>
|
||||||
{t('All')}
|
{t('All')}
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
<li class={clsx({ 'view-switcher__item--selected': subscriptionFilter() === 'authors' })}>
|
<li
|
||||||
|
class={clsx({
|
||||||
|
'view-switcher__item--selected': subscriptionFilter() === 'authors',
|
||||||
|
})}
|
||||||
|
>
|
||||||
<button type="button" onClick={() => setSubscriptionFilter('authors')}>
|
<button type="button" onClick={() => setSubscriptionFilter('authors')}>
|
||||||
{t('Authors')}
|
{t('Authors')}
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
<li class={clsx({ 'view-switcher__item--selected': subscriptionFilter() === 'topics' })}>
|
<li
|
||||||
|
class={clsx({
|
||||||
|
'view-switcher__item--selected': subscriptionFilter() === 'topics',
|
||||||
|
})}
|
||||||
|
>
|
||||||
<button type="button" onClick={() => setSubscriptionFilter('topics')}>
|
<button type="button" onClick={() => setSubscriptionFilter('topics')}>
|
||||||
{t('Topics')}
|
{t('Topics')}
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -2,12 +2,13 @@ import { Accessor, JSX, createContext, createEffect, createSignal, useContext }
|
||||||
import { createStore } from 'solid-js/store'
|
import { createStore } from 'solid-js/store'
|
||||||
|
|
||||||
import { apiClient } from '../graphql/client/core'
|
import { apiClient } from '../graphql/client/core'
|
||||||
import { AuthorFollowsResult, FollowingEntity } from '../graphql/schema/core.gen'
|
import { Author, AuthorFollowsResult, FollowingEntity } from '../graphql/schema/core.gen'
|
||||||
|
|
||||||
import { useSession } from './session'
|
import { useSession } from './session'
|
||||||
|
|
||||||
interface FollowingContextType {
|
interface FollowingContextType {
|
||||||
loading: Accessor<boolean>
|
loading: Accessor<boolean>
|
||||||
|
followers: Accessor<Array<Author>>
|
||||||
subscriptions: AuthorFollowsResult
|
subscriptions: AuthorFollowsResult
|
||||||
setSubscriptions: (subscriptions: AuthorFollowsResult) => void
|
setSubscriptions: (subscriptions: AuthorFollowsResult) => void
|
||||||
setFollowing: (what: FollowingEntity, slug: string, value: boolean) => void
|
setFollowing: (what: FollowingEntity, slug: string, value: boolean) => void
|
||||||
|
@ -31,6 +32,7 @@ const EMPTY_SUBSCRIPTIONS: AuthorFollowsResult = {
|
||||||
|
|
||||||
export const FollowingProvider = (props: { children: JSX.Element }) => {
|
export const FollowingProvider = (props: { children: JSX.Element }) => {
|
||||||
const [loading, setLoading] = createSignal<boolean>(false)
|
const [loading, setLoading] = createSignal<boolean>(false)
|
||||||
|
const [followers, setFollowers] = createSignal<Array<Author>>([])
|
||||||
const [subscriptions, setSubscriptions] = createStore<AuthorFollowsResult>(EMPTY_SUBSCRIPTIONS)
|
const [subscriptions, setSubscriptions] = createStore<AuthorFollowsResult>(EMPTY_SUBSCRIPTIONS)
|
||||||
const { author, session } = useSession()
|
const { author, session } = useSession()
|
||||||
|
|
||||||
|
@ -77,8 +79,14 @@ export const FollowingProvider = (props: { children: JSX.Element }) => {
|
||||||
|
|
||||||
createEffect(() => {
|
createEffect(() => {
|
||||||
if (author()) {
|
if (author()) {
|
||||||
console.debug('[context.following] author update detect')
|
try {
|
||||||
fetchData()
|
const { authors, followers, topics } = session().user.app_data
|
||||||
|
setSubscriptions({ authors, topics })
|
||||||
|
setFollowers(followers)
|
||||||
|
if (!authors) fetchData()
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -116,6 +124,7 @@ export const FollowingProvider = (props: { children: JSX.Element }) => {
|
||||||
setSubscriptions,
|
setSubscriptions,
|
||||||
isOwnerSubscribed,
|
isOwnerSubscribed,
|
||||||
setFollowing,
|
setFollowing,
|
||||||
|
followers,
|
||||||
loadSubscriptions: fetchData,
|
loadSubscriptions: fetchData,
|
||||||
follow,
|
follow,
|
||||||
unfollow,
|
unfollow,
|
||||||
|
|
|
@ -199,6 +199,7 @@ export const SessionProvider = (props: {
|
||||||
}
|
}
|
||||||
|
|
||||||
onCleanup(() => clearTimeout(minuteLater))
|
onCleanup(() => clearTimeout(minuteLater))
|
||||||
|
|
||||||
const authorData = async () => {
|
const authorData = async () => {
|
||||||
const u = session()?.user
|
const u = session()?.user
|
||||||
return u ? (await apiClient.getAuthorId({ user: u.id.trim() })) || null : null
|
return u ? (await apiClient.getAuthorId({ user: u.id.trim() })) || null : null
|
||||||
|
@ -217,7 +218,15 @@ export const SessionProvider = (props: {
|
||||||
apiClient.connect(token)
|
apiClient.connect(token)
|
||||||
inboxClient.connect(token)
|
inboxClient.connect(token)
|
||||||
}
|
}
|
||||||
if (!author()) loadAuthor()
|
|
||||||
|
try {
|
||||||
|
const { profile } = session().user.app_data
|
||||||
|
setAuthor(profile)
|
||||||
|
addAuthors([profile])
|
||||||
|
if (!profile) loadAuthor()
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e)
|
||||||
|
}
|
||||||
|
|
||||||
setIsSessionLoaded(true)
|
setIsSessionLoaded(true)
|
||||||
}
|
}
|
||||||
|
@ -263,7 +272,6 @@ export const SessionProvider = (props: {
|
||||||
() => {
|
() => {
|
||||||
props.onStateChangeCallback(session())
|
props.onStateChangeCallback(session())
|
||||||
},
|
},
|
||||||
{ defer: true },
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user