---
# System prepended metadata

title: Dynamic Pages Ideas

---

# Dynamic Pages Ideas

```typescript=

// Interfaces de componentes

interface DynamicZigZag {
    type: 'zigZagBlock', // Que nos de Manu el nombre del modelo de Contentful
    data: ZigZagBlock // Interface que ya existe
}

interface DynamicFeaturedClaim {
    type: 'featuredClaim',
    data: FeaturedClaim
}

// Page

type DynamicComponent = DynamicZigZag | DynamicFeaturedClaim

interface DynamicPage {
    ...
    components: DynamicComponent[]
}

```

```typescript=
// DynamicPageContainer.tsx

// render
...
components.map(({type, data}) => {
    switch(type) {
        case 'zigZagBlock':
            return <ZigZagBlock data={data} />
        case 'featuredClaim':
            return <FeaturedClaim data={data} />
        default:
            return null
    }
})
```