File tree Expand file tree Collapse file tree 2 files changed +35
-6
lines changed
Expand file tree Collapse file tree 2 files changed +35
-6
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { motion } from "framer-motion";
88import "../App.css" ;
99import WorthAlert from "./Worth/WorthAlert" ;
1010import Skeleton from "./Skeletons/Skeleton" ;
11+ import HomeSkeleton from "./Skeletons/HomeSkeleton" ;
1112
1213export default function Home ( ) {
1314 const [ showStats , setShowStats ] = useState ( false ) ;
@@ -72,12 +73,16 @@ export default function Home() {
7273 < Navbar onSearch = { handleSearch } />
7374 {
7475 loading ? (
75- < div className = "flex flex-wrap justify-center gap-4 items-center py-4 " >
76- {
77- Array . from ( { length : 9 } , ( _ , index ) => index + 1 ) . map ( ( item ) => {
78- return < Skeleton key = { item } />
79- } )
80- }
76+ < div className = "flex flex-col mx-auto max-w-screen-xl px-2 sm:px-6 lg:px-8" >
77+ < div className = "grid grid-cols-1 gap-4 py-4 " >
78+ < div className = "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3" >
79+ {
80+ Array . from ( { length : 9 } , ( _ , index ) => index + 1 ) . map ( ( item ) => {
81+ return < HomeSkeleton key = { item } />
82+ } )
83+ }
84+ </ div >
85+ </ div >
8186 </ div >
8287 )
8388 : (
Original file line number Diff line number Diff line change 1+ import React from 'react'
2+
3+ const HomeSkeleton = ( ) => {
4+ return (
5+
6+ < div className = 'flex justify-center items-center rounded-lg h-[280px] bg-[#292829]' >
7+
8+ < div className = "flex flex-col gap-4 w-52" >
9+ < div className = "flex gap-4 items-center" >
10+ < div className = "skeleton w-16 h-16 rounded-full shrink-0" > </ div >
11+ < div className = "flex flex-col gap-4" >
12+ < div className = "skeleton h-4 w-20" > </ div >
13+ < div className = "skeleton h-4 w-28" > </ div >
14+ </ div >
15+ </ div >
16+ < div className = "skeleton h-32 w-full" > </ div >
17+ </ div >
18+ </ div >
19+
20+
21+ )
22+ }
23+
24+ export default HomeSkeleton
You can’t perform that action at this time.
0 commit comments