File tree Expand file tree Collapse file tree 1 file changed +18
-16
lines changed Expand file tree Collapse file tree 1 file changed +18
-16
lines changed Original file line number Diff line number Diff line change 2
2
import type { ImageMetadata } from " astro" ;
3
3
4
4
import { Icon } from " astro-icon/components" ;
5
- import type { SocialsData } from " ../lib/socials-transformer " ;
5
+ import type { SocialLinksData } from " @fujocoded/zod-transform-socials " ;
6
6
import type { CollectionEntry } from " astro:content" ;
7
7
import type { Project } from " ../content/config" ;
8
8
@@ -12,7 +12,7 @@ interface Props {
12
12
avatar: ImageMetadata ;
13
13
roles: CollectionEntry <" team" >[" data" ][" roles" ];
14
14
project? : Project | undefined ;
15
- contacts: SocialsData [];
15
+ contacts: SocialLinksData [];
16
16
}
17
17
18
18
const props = Astro .props ;
@@ -39,7 +39,6 @@ const props = Astro.props;
39
39
</ul >
40
40
) : (
41
41
Object .keys (props .roles ).map (
42
- // @ts-expect-error
43
42
(project : Project ) =>
44
43
!! props .roles [project ].length && (
45
44
<li >
@@ -64,19 +63,22 @@ const props = Astro.props;
64
63
<ul class:list ={ { hidden: props .contacts .length == 0 }} class =" contacts" >
65
64
{
66
65
props .contacts .map ((contact ) => (
67
- <li >
68
- <a href = { contact .url } >
69
- { contact .icon ? (
70
- <>
71
- <Icon name = { contact .icon } />
72
- </>
73
- ) : (
74
- <>
75
- <Icon name = { " lucide:home" } />
76
- </>
77
- )}
78
- </a >
79
- </li >
66
+ <li >
67
+ <a href = { contact .url } >
68
+ { contact .icon ? (
69
+ <>
70
+ <Icon name = { contact .icon } title = { contact .platform } />
71
+ </>
72
+ ) : (
73
+ <>
74
+ <Icon
75
+ name = { " lucide:home" }
76
+ title = { ` ${props .name }'s website ` }
77
+ />
78
+ </>
79
+ )}
80
+ </a >
81
+ </li >
80
82
))
81
83
}
82
84
</ul >
You can’t perform that action at this time.
0 commit comments