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 22import type { ImageMetadata } from " astro" ;
33
44import { Icon } from " astro-icon/components" ;
5- import type { SocialsData } from " ../lib/socials-transformer " ;
5+ import { SocialsSchema } from " @fujocoded/zod-transform-socials " ;
66import type { CollectionEntry } from " astro:content" ;
77import type { Project } from " ../content/config" ;
88
@@ -12,7 +12,7 @@ interface Props {
1212 avatar: ImageMetadata ;
1313 roles: CollectionEntry <" team" >[" data" ][" roles" ];
1414 project? : Project | undefined ;
15- contacts: SocialsData [];
15+ contacts: SocialsSchema [];
1616}
1717
1818const props = Astro .props ;
@@ -39,7 +39,6 @@ const props = Astro.props;
3939 </ul >
4040 ) : (
4141 Object .keys (props .roles ).map (
42- // @ts-expect-error
4342 (project : Project ) =>
4443 !! props .roles [project ].length && (
4544 <li >
@@ -64,19 +63,22 @@ const props = Astro.props;
6463 <ul class:list ={ { hidden: props .contacts .length == 0 }} class =" contacts" >
6564 {
6665 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 >
8082 ))
8183 }
8284 </ul >
You can’t perform that action at this time.
0 commit comments