From e153be1115441ef240bf532c4a72d7b53b916618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yusuf=20Akg=C3=BCl?= <s86116@bht-berlin.de> Date: Wed, 5 Jul 2023 16:19:40 +0200 Subject: [PATCH] possible trends fix --- components/trends/components/trends.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/trends/components/trends.tsx b/components/trends/components/trends.tsx index 2d1eb6d..2fef530 100644 --- a/components/trends/components/trends.tsx +++ b/components/trends/components/trends.tsx @@ -10,8 +10,6 @@ import { Trend } from "./trend" export const Trends = ({ title = "Trends" }: { title?: string }) => { const { data: hashtags, isLoading, isError, isSuccess } = useHashtags() - if (hashtags && hashtags?.length <= 0) return null - return ( <div className="space-y-5 flex flex-col"> {title && <h1 className="font-bold p-1">{title}</h1>} @@ -19,6 +17,10 @@ export const Trends = ({ title = "Trends" }: { title?: string }) => { <LoadingItem /> ) : isError ? ( <TryAgain /> + ) : hashtags?.length <= 0 ? ( + <Card className="p-1"> + <h1 className="text-center">No trends yet</h1> + </Card> ) : isSuccess && hashtags?.map((hashtag, index) => { return ( -- GitLab