diff --git a/webapp/src/store/contents.ts b/webapp/src/store/contents.ts index 9cf3c7721..2c547f12f 100644 --- a/webapp/src/store/contents.ts +++ b/webapp/src/store/contents.ts @@ -5,7 +5,7 @@ import {createSlice, PayloadAction, createSelector} from '@reduxjs/toolkit' import {ContentBlock} from '../blocks/contentBlock' -import {getCards} from './cards' +import {getCards, getTemplates} from './cards' import {initialLoad, initialReadOnlyLoad} from './initialLoad' import {RootState} from './index' @@ -58,8 +58,9 @@ export function getCardContents(cardId: string): (state: RootState) => Array => { - const card = cards[cardId] + getTemplates, + (contents, cards, templates): Array => { + const card = {...cards, ...templates}[cardId] const result: Array = [] if (card?.fields?.contentOrder) { for (const contentId of card.fields.contentOrder) {