mirror of
https://github.com/linsa-io/linsa.git
synced 2026-11-13 12:23:37 +01:00
fix: missing task
This commit is contained in:
1 parent
5294ade0ab
commit
ace9efc687
1 file changed
+7
@@ -1,8 +1,11 @@
|
||||
import * as React from "react"
|
||||
import { useAccount } from "@/lib/providers/jazz-provider"
|
||||
import { NavItem } from "~/components/custom/nav-item"
|
||||
import { ListOfTasks } from "~/lib/schema"
|
||||
|
||||
export const LinkCollection: React.FC = () => {
|
||||
// will delete soon after do the versioning
|
||||
const { me: tempMe } = useAccount()
|
||||
const { me } = useAccount({
|
||||
root: {
|
||||
personalLinks: [],
|
||||
@@ -14,6 +17,10 @@ export const LinkCollection: React.FC = () => {
|
||||
},
|
||||
})
|
||||
|
||||
if (!tempMe.root?.tasks) {
|
||||
tempMe.root!.tasks = ListOfTasks.create([], { owner: tempMe })
|
||||
}
|
||||
|
||||
const linkCount = me?.root.personalLinks?.length || 0
|
||||
const pageCount = me?.root.personalPages?.length || 0
|
||||
const taskCount = me?.root.tasks?.length || 0
|
||||
|
||||
Reference in new issue
Block a user