Refactor: Implement Code Splitting

This commit is contained in:
gpt-engineer-app[bot]
2025-10-21 18:31:08 +00:00
parent da0f01a785
commit 70a8534da7
9 changed files with 722 additions and 89 deletions

View File

@@ -12,8 +12,8 @@ import { Label } from '@/components/ui/label';
import { Card } from '@/components/ui/card';
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table';
import { Badge } from '@/components/ui/badge';
import { UppyPhotoUpload } from '@/components/upload/UppyPhotoUpload';
import { MarkdownEditor } from '@/components/admin/MarkdownEditor';
import { UppyPhotoUploadLazy } from '@/components/upload/UppyPhotoUploadLazy';
import { MarkdownEditorLazy } from '@/components/admin/MarkdownEditorLazy';
import { generateSlugFromName } from '@/lib/slugUtils';
import { extractCloudflareImageId } from '@/lib/cloudflareImageUtils';
import { Edit, Trash2, Eye, Plus } from 'lucide-react';
@@ -306,7 +306,7 @@ export default function AdminBlog() {
<div className="space-y-2">
<Label>Featured Image</Label>
<UppyPhotoUpload
<UppyPhotoUploadLazy
onUploadComplete={(urls) => {
if (urls.length > 0) {
const url = urls[0];
@@ -330,7 +330,7 @@ export default function AdminBlog() {
<div className="space-y-2">
<Label htmlFor="content">Content (Markdown) *</Label>
<MarkdownEditor
<MarkdownEditorLazy
value={content}
onChange={setContent}
onSave={async (value) => {