Skip to content
Snippets Groups Projects
Commit e153be11 authored by Yusuf Akgül's avatar Yusuf Akgül :hatching_chick:
Browse files

possible trends fix

parent 73ac2152
No related branches found
No related tags found
No related merge requests found
Pipeline #39373 passed
......@@ -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 (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment