chore: preload nested deps

This commit is contained in:
Aslam H
2024-11-13 22:27:43 +07:00
parent 7eda38955e
commit a44cf910b2
23 changed files with 231 additions and 234 deletions

View File

@@ -17,7 +17,7 @@ export const openPopoverForIdAtom = atom<string | null>(null)
export function TopicDetailComponent() {
const params = useParams({ from: "/_layout/_pages/(topic)/$" })
const { me } = useAccountOrGuest({ root: { personalLinks: [] } })
const { me } = useAccountOrGuest({ root: { personalLinks: [{}] } })
const topicID = React.useMemo(
() =>

View File

@@ -29,9 +29,9 @@ export const TopicDetailHeader = function TopicDetailHeader({
const isMobile = useMedia("(max-width: 770px)")
const { me } = useAccountOrGuest({
root: {
topicsWantToLearn: [],
topicsLearning: [],
topicsLearned: [],
topicsWantToLearn: [{}],
topicsLearning: [{}],
topicsLearned: [{}],
},
})

View File

@@ -25,7 +25,7 @@ export function TopicDetailList({
activeIndex,
setActiveIndex,
}: TopicDetailListProps) {
const { me } = useAccountOrGuest({ root: { personalLinks: [] } })
const { me } = useAccountOrGuest({ root: { personalLinks: [{}] } })
const personalLinks =
!me || me._type === "Anonymous" ? undefined : me.root.personalLinks