From d040dc9746627ab4178a46dca2c4d0d62e807c57 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Mon, 15 Aug 2022 14:19:23 +0200 Subject: [PATCH] Fix: Message when db contains no praise --- packages/frontend/src/pages/Start/components/PraiseTable.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/frontend/src/pages/Start/components/PraiseTable.tsx b/packages/frontend/src/pages/Start/components/PraiseTable.tsx index a892dbc0e..04919cb65 100644 --- a/packages/frontend/src/pages/Start/components/PraiseTable.tsx +++ b/packages/frontend/src/pages/Start/components/PraiseTable.tsx @@ -11,6 +11,9 @@ export const PRAISE_LIST_KEY = 'ALL_PRAISE'; export const PraiseTable = (): JSX.Element => { const allPraise = useRecoilValue(AllPraiseList(PRAISE_LIST_KEY)); + if (!Array.isArray(allPraise) || allPraise.length === 0) + return
No praise have been dished yet.
; + return ( <>