From 7bc168ad8451f0ec43e704316470604c12aab8a1 Mon Sep 17 00:00:00 2001 From: Hossein Date: Tue, 17 Aug 2021 16:36:10 -0400 Subject: [PATCH] Fix Problem (#1019) --- webapp/src/store/contents.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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) {