Skip to content

Commit

Permalink
#120 Arreglado bug cargando
Browse files Browse the repository at this point in the history
Signed-off-by: danigonzser <[email protected]>
  • Loading branch information
danigonzser committed Nov 12, 2024
1 parent 6efc907 commit 313bec3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/app/(home)/catalogues/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Suspense } from "react"
import type { Metadata } from 'next'
import CatalogueNav from "@/components/catalogue_navegation"
import TitleSkeleton from "@/components/title_skeleton"
import MemesSkeleton from "@/components/memes_skeleton"

export async function generateMetadata(
props: {
Expand Down Expand Up @@ -41,7 +42,7 @@ export default async function CatalogueMemes(
</Suspense>
</h1>
</div >
<Suspense>
<Suspense fallback={<MemesSkeleton />}>
<Thumbs paramId={params.id} />
</Suspense>
</>
Expand Down
10 changes: 7 additions & 3 deletions src/components/memes_skeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ import { Skeleton } from "./ui/skeleton"
export default function MemesSkeleton() {
return (
<div className="flex flex-col content-center items-center px-4 py-8">
{[...Array(30)].map((key) => (
<Skeleton key={key} className="h-[225px] w-[400px] bg-muted-foreground/20 rounded-xl" />
))}
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
{[...Array(30)].map((key) => (
<div key={key}>
<Skeleton key={key} className="h-[225px] w-[400px] bg-muted-foreground/20 rounded-xl" />
</div>
))}
</div >
</div >
)
}

0 comments on commit 313bec3

Please sign in to comment.