Refactor code and add loading components in marketing apps
This commit alters the source of the cache module import used in [...slug]/page.tsx from 'next/cache' to 'react'. Import statements in blog/page.tsx and docs/layout.tsx have been restructured for clarity, keeping local imports separate. Added new loading.tsx files in both blog and docs directories that exports the GlobalLoader from '@kit/ui/global-loader'.
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import { Cms } from '@kit/cms';
|
||||
|
||||
import { DocsNavigation } from '~/(marketing)/docs/_components/docs-navigation';
|
||||
import { getDocs } from '~/(marketing)/docs/_lib/server/docs.loader';
|
||||
import { createI18nServerInstance } from '~/lib/i18n/i18n.server';
|
||||
|
||||
// local imports
|
||||
import { DocsNavigation } from './_components/docs-navigation';
|
||||
import { getDocs } from './_lib/server/docs.loader';
|
||||
|
||||
async function DocsLayout({ children }: React.PropsWithChildren) {
|
||||
const { resolvedLanguage } = await createI18nServerInstance();
|
||||
const pages = await getDocs(resolvedLanguage);
|
||||
|
||||
Reference in New Issue
Block a user