feat: Page Editor Phase 1 - React DynamicPageRenderer
- Add DynamicPageRenderer component for structural pages and CPT content - Add 6 section components: - HeroSection with multiple layout variants - ContentSection for rich text/HTML content - ImageTextSection with image-left/right layouts - FeatureGridSection with grid-2/3/4 layouts - CTABannerSection with color schemes - ContactFormSection with webhook POST and redirect - Add dynamic routes to App.tsx for /:slug and /:pathBase/:slug - Build customer-spa successfully
This commit is contained in:
@@ -19,6 +19,7 @@ import Wishlist from './pages/Wishlist';
|
||||
import Login from './pages/Login';
|
||||
import ForgotPassword from './pages/ForgotPassword';
|
||||
import ResetPassword from './pages/ResetPassword';
|
||||
import { DynamicPageRenderer } from './pages/DynamicPage';
|
||||
|
||||
// Create QueryClient instance
|
||||
const queryClient = new QueryClient({
|
||||
@@ -92,8 +93,11 @@ function AppRoutes() {
|
||||
{/* My Account */}
|
||||
<Route path="/my-account/*" element={<Account />} />
|
||||
|
||||
{/* Fallback to initial route */}
|
||||
<Route path="*" element={<Navigate to={initialRoute} replace />} />
|
||||
{/* Dynamic Pages - CPT content with path base (e.g., /blog/:slug) */}
|
||||
<Route path="/:pathBase/:slug" element={<DynamicPageRenderer />} />
|
||||
|
||||
{/* Dynamic Pages - Structural pages (e.g., /about, /contact) */}
|
||||
<Route path="/:slug" element={<DynamicPageRenderer />} />
|
||||
</Routes>
|
||||
</BaseLayout>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user