37a86bfaf7
Phase 2: Performance Optimizations - Implement dynamic imports for non-critical sections - Add loading skeletons for lazy-loaded components - Optimize bundle size with code splitting - Enable SSR for dynamic components Phase 3: UX Optimizations - Create ErrorBoundary component for graceful error handling - Add Toast notification component for user feedback - Implement success/error notifications in contact form - Add error handling with user-friendly messages Files modified: - src/app/(marketing)/page.tsx: Dynamic imports for sections - src/app/(marketing)/layout.tsx: Error boundary integration - src/components/sections/contact-section.tsx: Toast notifications - src/components/ui/error-boundary.tsx: New error boundary component - src/components/ui/toast.tsx: New toast notification component Impact: - Reduced initial bundle size - Faster page load times - Better error handling - Improved user feedback - Enhanced user experience
16 lines
332 B
TypeScript
16 lines
332 B
TypeScript
import { ErrorBoundary } from '@/components/ui/error-boundary';
|
|
|
|
export default function MarketingLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
return (
|
|
<div className="min-h-screen flex flex-col">
|
|
<ErrorBoundary>
|
|
<main className="flex-1">{children}</main>
|
|
</ErrorBoundary>
|
|
</div>
|
|
);
|
|
}
|