Skip to content

Commit 7c6d103

Browse files
committed
Move the export down to work around the hMR hydration bug
1 parent 6f8d177 commit 7c6d103

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/components/learn-aggregator/learn-pages.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,12 @@ const _items: Record<
144144
},
145145
}
146146

147-
export const learnPages = _items as Record<LearnPagePath, LearnPageItem | null>
147+
const learnPages = _items as Record<LearnPagePath, LearnPageItem | null>
148148

149-
export const pagesBySection: Record<LearnPageItem["section"], LearnPageItem[]> =
150-
{
151-
"getting-started": [],
152-
"best-practices": [],
153-
}
149+
const pagesBySection: Record<LearnPageItem["section"], LearnPageItem[]> = {
150+
"getting-started": [],
151+
"best-practices": [],
152+
}
154153

155154
for (const path in learnPages) {
156155
const page = learnPages[path as LearnPagePath]
@@ -171,3 +170,5 @@ for (const path in learnPages) {
171170

172171
pagesBySection[page.section].push(page)
173172
}
173+
174+
export { learnPages, pagesBySection }

0 commit comments

Comments
 (0)