Added placeholder

This commit is contained in:
Lucas Oliveira 2023-11-28 14:19:30 -03:00
commit d56093fa80

View file

@ -95,6 +95,9 @@ export default function ComponentsComponent({
>
<div className="flex h-full w-full flex-col justify-between">
<div className="flex w-full flex-col gap-4">
{!isLoading && data.length === 0 ? (
<div className="w-full text-center">You haven't created any {name}s yet.</div>
) : (
<div className="grid w-full gap-4 md:grid-cols-2 lg:grid-cols-2">
{!isLoading || data?.length > 0 ? (
data?.map((item, idx) => (
@ -127,8 +130,6 @@ export default function ComponentsComponent({
}
/>
))
) : !isLoading && data?.length === 0 ? (
<>You haven't created {name}s yet.</>
) : (
<>
<SkeletonCardComponent />
@ -136,6 +137,7 @@ export default function ComponentsComponent({
</>
)}
</div>
)}
</div>
{!isLoading && allData.length > 0 && (
<div className="relative py-6">