From 0b9547a494736a436ba0ea2b8f3e1fca5b7408c8 Mon Sep 17 00:00:00 2001 From: b1ek Date: Mon, 11 Nov 2024 21:18:56 +1000 Subject: [PATCH] print something when there is nothing --- front/src/components/Posts.tsx | 5 +++++ front/src/pages/index.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/front/src/components/Posts.tsx b/front/src/components/Posts.tsx index 2b7d28c..a16fc29 100644 --- a/front/src/components/Posts.tsx +++ b/front/src/components/Posts.tsx @@ -28,6 +28,11 @@ export function Posts(props: PostsProps) { ) } + { + props.rows.length == 0 + ?
empty!
+ : null + } ); } \ No newline at end of file diff --git a/front/src/pages/index.tsx b/front/src/pages/index.tsx index 5797d87..71dfcfc 100644 --- a/front/src/pages/index.tsx +++ b/front/src/pages/index.tsx @@ -94,7 +94,7 @@ export function Index() { { data ? selected ? selected?.indexOf(x) === -1 : true)} onSelectChange={select} /> - : <> + :
no data!
}