debug-subs
This commit is contained in:
parent
27711d7e99
commit
cfca2dbbab
|
@ -80,17 +80,13 @@ export const FollowingProvider = (props: { children: JSX.Element }) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const loadData = (_a?: Author) => {
|
createEffect(() => {
|
||||||
// console.debug('[context.following] current subs:', subscriptions)
|
if (author() && !subscriptions?.authors?.length && !subscriptions?.topics?.length) {
|
||||||
if (!subscriptions?.authors?.length && !subscriptions?.topics?.length) {
|
|
||||||
// && subscriptions.communites?.length
|
// && subscriptions.communites?.length
|
||||||
|
console.debug('[context.following] author with no subs detected')
|
||||||
fetchData()
|
fetchData()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
createEffect(() => {
|
|
||||||
if (author()) loadData()
|
|
||||||
})
|
})
|
||||||
onMount(loadData)
|
|
||||||
|
|
||||||
const setFollowing = (what: FollowingEntity, slug: string, value = true) => {
|
const setFollowing = (what: FollowingEntity, slug: string, value = true) => {
|
||||||
setSubscriptions((prevSubscriptions) => {
|
setSubscriptions((prevSubscriptions) => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user