From 4715b7a5bbb2b9e2822d0ba980915df13cf5fc1c Mon Sep 17 00:00:00 2001 From: sylenien Date: Tue, 29 Nov 2022 11:05:16 +0100 Subject: [PATCH] fix(ui): fix store empty state display --- .../app/components/Session_/Storage/Storage.tsx | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/frontend/app/components/Session_/Storage/Storage.tsx b/frontend/app/components/Session_/Storage/Storage.tsx index 0f5e682c5..f955912e7 100644 --- a/frontend/app/components/Session_/Storage/Storage.tsx +++ b/frontend/app/components/Session_/Storage/Storage.tsx @@ -53,7 +53,7 @@ function Storage(props: Props) { const renderDiff = (item: Record, prevItem: Record) => { if (!prevItem) { // we don't have state before first action - return
; + return
; } const stateDiff = diff(prevItem.state, item.state); @@ -106,13 +106,6 @@ function Storage(props: Props) { player.jump(list[listNow.length].time); }; - const renderTab = () => { - if (listNow.length === 0) { - return 'Not initialized'; //? - } - return ; - }; - const renderItem = (item: Record, i: number, prevItem: Record) => { let src; let name; @@ -279,16 +272,16 @@ function Storage(props: Props) { ) : null } size="small" - show={listNow.length === 0} + show={list.length === 0} > {showStore && (
- {listNow.length === 0 ? ( + {list.length === 0 ? (
{'Empty state.'}
) : ( - renderTab() + )}
)}