--- import config from 'virtual:starlight/user-config'; import Icon from '../user-components/Icon.astro'; import type { Props } from '../props'; type Platform = keyof NonNullable; type SocialConfig = NonNullable[Platform]>; const links = Object.entries(config.social || {}) as [Platform, SocialConfig][]; --- { links.length > 0 && ( <> {links.map(([platform, { label, url }]) => ( {label} ))} ) }