@@ -13,12 +13,19 @@ export default function IconsProject() {
1313
1414 useEffect ( ( ) => {
1515 window . scrollTo ( 0 , 0 ) ;
16+ const id = setTimeout ( ( ) => {
17+ setFinishedTimeout ( true ) ;
18+ } , 1000 ) ;
19+
20+ return ( ) => clearTimeout ( id ) ;
1621
1722
1823 } , [ ] ) ;
1924
2025 const { iconsProjects } = IconsData ( ) ;
2126
27+ const [ finishedTimeout , setFinishedTimeout ] = useState ( false ) ;
28+
2229 const [ stackIconKeys , setStackIconKeys ] = useState ( [ ] ) ;
2330 const [ stackIconValues , setStackIconValues ] = useState ( [ ] ) ;
2431
@@ -69,23 +76,30 @@ export default function IconsProject() {
6976 < input className = ' bg-[#70708e33] w-full rounded-lg px-4 py-2 ' placeholder = '🔍 Search Icons' type = 'text' onChange = { _handleSearch } />
7077 </ div >
7178 < ul className = 'mt-8 flex flex-wrap gap-4 justify-center' >
72- { stackIconValues . length > 0 ? (
73-
74- stackIconValues . map ( ( item , index ) => {
75- return < Card key = { index } item = { item } iconKey = { stackIconKeys [ index ] } /> ;
76- } )
77-
78- ) : (
79- < div className = 'flex flex-col m-auto gap-4' >
80- < p className = 'text-xl text-center' >
81- Didn't find your icon? < br /> Tell us about here:{ ' ' }
82- < a className = 'flex gap-2 text-[#00979C] justify-center' href = 'https://github.com/DIGOARTHUR/github-automated-repos/issues/new?assignees=& labels = & template = 2 - feature - request . yaml ' >
83- Feature Request < FiExternalLink />
84- </ a >
85- </ p >
86- < img className = 'h-[350px]' src = 'https://user-images.githubusercontent.com/59892368/220364871-f553109d-855f-426a-bbe5-5e1c11278003.svg' > </ img >
87- </ div >
88- ) }
79+ {
80+ finishedTimeout == false ? ( < div > carregando</ div > ) : (
81+ stackIconValues . length > 0 ? (
82+
83+ stackIconValues . map ( ( item , index ) => {
84+ return < Card key = { index } item = { item } iconKey = { stackIconKeys [ index ] } /> ;
85+ } )
86+
87+
88+ ) : (
89+ < div className = 'flex flex-col m-auto gap-4' >
90+ < p className = 'text-xl text-center' >
91+ Didn't find your icon? < br /> Tell us about here:{ ' ' }
92+ < a className = 'flex gap-2 text-[#00979C] justify-center' href = 'https://github.com/DIGOARTHUR/github-automated-repos/issues/new?assignees=& labels = & template = 2 - feature - request . yaml ' >
93+ Feature Request < FiExternalLink />
94+ </ a >
95+ </ p >
96+ < img className = 'h-[350px]' src = 'https://user-images.githubusercontent.com/59892368/220364871-f553109d-855f-426a-bbe5-5e1c11278003.svg' > </ img >
97+ </ div >
98+ )
99+ )
100+ }
101+
102+
89103
90104
91105 </ ul >
0 commit comments