()
| 3 | import { ContentT } from '@/types/markdown'; |
| 4 | |
| 5 | export default async function LearnPage() { |
| 6 | let content: ContentT; |
| 7 | |
| 8 | if (process.env.NODE_ENV === 'production') { |
| 9 | const data = await getLearnBySlug({ |
| 10 | slug: 'index', |
| 11 | section: 'learn', |
| 12 | }); |
| 13 | |
| 14 | content = data.content; |
| 15 | } else { |
| 16 | // dynamically import the file |
| 17 | const { getContentBySlugOnDev } = await import('@/lib/get-content-by-slug-on-dev'); |
| 18 | |
| 19 | const data = await getContentBySlugOnDev({ |
| 20 | section: 'learn', |
| 21 | slug: 'index', |
| 22 | type: 'learn' |
| 23 | }); |
| 24 | |
| 25 | content = data.content; |
| 26 | } |
| 27 | |
| 28 | return <Content content={content} />; |
| 29 | } |
nothing calls this directly
no test coverage detected