fix: conditionally render feed preview and items based on entries availability
- Updated the rendering logic in the share list component to display the feed preview and items only when there are entries available. This change enhances the user experience by preventing empty states and ensuring that the UI reflects the current data accurately. Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
parent
a92364f025
commit
15a14c63b6
|
|
@ -113,10 +113,14 @@ export function Component() {
|
|||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="mt-8 text-zinc-500">{t("feed.preview")}</div>
|
||||
<div className={cn("w-full pb-12 pt-8", "flex max-w-3xl flex-col gap-2")}>
|
||||
<Item entries={list.data.entries} view={list.data.list.view} />
|
||||
</div>
|
||||
{!!list.data.entries?.length && (
|
||||
<>
|
||||
<div className="mt-8 text-zinc-500">{t("feed.preview")}</div>
|
||||
<div className={cn("w-full pb-12 pt-8", "flex max-w-3xl flex-col gap-2")}>
|
||||
<Item entries={list.data.entries} view={list.data.list.view} />
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue