🎨 Remove not essential store from the rendering of the PassagesDisplay component

This commit is contained in:
2023-02-09 21:17:58 +01:00
parent 275954f52d
commit f0fe3f8803

View File

@@ -173,9 +173,8 @@ export const PassagesDisplay: ParentComponent = () => {
chunkSize += byLinePassagesKeys.length; chunkSize += byLinePassagesKeys.length;
} }
else { else {
const [store] = createStore(chunk);
const panelid = index++; const panelid = index++;
const panel = <PassagesPanel show={panelid == displayedPanelId()} passages={store} />; const panel = <PassagesPanel show={panelid == displayedPanelId()} passages={chunk} />;
newPanels.push(panel); newPanels.push(panel);
positioneds.push({ position: panelid, panel: panel }); positioneds.push({ position: panelid, panel: panel });
@@ -186,8 +185,7 @@ export const PassagesDisplay: ParentComponent = () => {
} }
if (chunkSize) { if (chunkSize) {
const panelId = index++; const panelId = index++;
const [store] = createStore(chunk); const panel = <PassagesPanel show={panelId == displayedPanelId()} passages={chunk} />;
const panel = <PassagesPanel show={panelId == displayedPanelId()} passages={store} />;
newPanels.push(panel); newPanels.push(panel);
positioneds.push({ position: panelId, panel: panel }); positioneds.push({ position: panelId, panel: panel });
} }