@@ -11,10 +11,10 @@ import { RepoType } from "@/types/index";
1111import { Building } from "lucide-react" ;
1212
1313interface CenterCardProps {
14- repo : RepoType ;
14+ resource : RepoType ;
1515}
1616
17- const ResourceCard = ( { repo } : CenterCardProps ) => {
17+ const ResourceCard = ( { resource } : CenterCardProps ) => {
1818
1919 const handleRedirect = ( url : string ) => {
2020 if ( ! url ) return ;
@@ -28,25 +28,29 @@ const ResourceCard = ({ repo }: CenterCardProps) => {
2828 }
2929
3030 return (
31-
32- < Card className = "mb-4 overflow-hidden border-0 shadow-md" onClick = { ( ) => handleRedirect ( repo . url ) } >
33- < Accordion type = "single" className = "w-full" >
34- < AccordionItem value = { repo . url } className = "border-0" >
35- < AccordionTrigger className = "cursor-pointer bg-white hover:bg-gray-50 px-6 py-4 text-left" >
36- < div className = "flex flex-1 items-center justify-center" >
37- < div className = "flex items-center space-x-4" >
38- < div className = "flex h-10 w-10 items-center justify-center rounded-full bg-primary/10" >
39- < Building className = "h-5 w-5 text-primary" />
40- </ div >
41- < div >
42- < h3 className = "font-medium text-lg text-center" > { repo . name } </ h3 >
31+ resource ?
32+ ( < Card className = "mb-4 overflow-hidden border-0 shadow-md" onClick = { ( ) => handleRedirect ( resource . url ) } >
33+ < Accordion type = "single" className = "w-full" >
34+ < AccordionItem value = { resource . url } className = "border-0" >
35+ < AccordionTrigger className = "cursor-pointer bg-white hover:bg-gray-50 px-6 py-4 text-left" >
36+ < div className = "flex flex-1 items-center justify-center" >
37+ < div className = "flex items-center space-x-4" >
38+ < div className = "flex h-10 w-10 items-center justify-center rounded-full bg-primary/10" >
39+ < Building className = "h-5 w-5 text-primary" />
40+ </ div >
41+ < div >
42+ < h3 className = "font-medium text-lg text-center" > { resource . name } </ h3 >
43+ </ div >
4344 </ div >
4445 </ div >
45- </ div >
46- </ AccordionTrigger >
47- </ AccordionItem >
48- </ Accordion >
49- </ Card >
46+ </ AccordionTrigger >
47+ </ AccordionItem >
48+ </ Accordion >
49+ </ Card > ) : (
50+ < div >
51+ < h1 > undefined</ h1 >
52+ </ div >
53+ )
5054 ) ;
5155} ;
5256
0 commit comments