feat(perf,ux): implement performance and UX optimizations
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
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { ErrorBoundary } from '@/components/ui/error-boundary';
|
||||
|
||||
export default function MarketingLayout({
|
||||
children,
|
||||
}: {
|
||||
@@ -5,7 +7,9 @@ export default function MarketingLayout({
|
||||
}) {
|
||||
return (
|
||||
<div className="min-h-screen flex flex-col">
|
||||
<main className="flex-1">{children}</main>
|
||||
<ErrorBoundary>
|
||||
<main className="flex-1">{children}</main>
|
||||
</ErrorBoundary>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user