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:
giancarlo
2024-05-01 16:47:25 +07:00
parent 898e1c3dbb
commit 809b36dd96
5 changed files with 14 additions and 4 deletions

View File

@@ -0,0 +1,3 @@
import { GlobalLoader } from '@kit/ui/global-loader';
export default GlobalLoader;

View File

@@ -4,10 +4,11 @@ import { createCmsClient } from '@kit/cms';
import { If } from '@kit/ui/if';
import { Trans } from '@kit/ui/trans';
import { SitePageHeader } from '~/(marketing)/_components/site-page-header';
import { createI18nServerInstance } from '~/lib/i18n/i18n.server';
import { withI18n } from '~/lib/i18n/with-i18n';
// local imports
import { SitePageHeader } from '../_components/site-page-header';
import { BlogPagination } from './_components/blog-pagination';
import { PostPreview } from './_components/post-preview';