diff --git a/src/components/DynamicIcon.tsx b/src/components/DynamicIcon.tsx index 3296b0d..7732ed3 100644 --- a/src/components/DynamicIcon.tsx +++ b/src/components/DynamicIcon.tsx @@ -4,11 +4,13 @@ import * as MdIcons from 'react-icons/md'; import * as AiIcons from 'react-icons/ai'; import * as GiIcons from 'react-icons/gi'; import * as IoIcons from 'react-icons/io'; -import * as CiIcons from "react-icons/ci"; -import * as FiIcons from "react-icons/fi"; -import * as LuIcons from "react-icons/lu"; +import * as CiIcons from 'react-icons/ci'; +import * as FiIcons from 'react-icons/fi'; +import * as LuIcons from 'react-icons/lu'; import * as SiIcons from 'react-icons/si'; +// DynamicIcon.tsx - Load React Icon library dynamically from attributes from Directus + const iconSets = { fa: FaIcons, md: MdIcons, @@ -21,13 +23,25 @@ const iconSets = { si: SiIcons, }; -const DynamicIcon = ({ name, set = 'fa', size = 20, color = 'currentColor', className = '' }: {name: string, set: string, size: number, color: string, className: string }) => { +const DynamicIcon = ({ + name, + set = 'fa', + size = 20, + color = 'currentColor', + className = '', +}: { + name: string; + set: string; + size: number; + color: string; + className: string; +}) => { let IconComponent = FaIcons.FaAlignCenter; - if (name.startsWith("Fa")) { - IconComponent = iconSets["fa"][name] - } else if (name.startsWith("Si")) { - IconComponent = iconSets["si"][name] + if (name.startsWith('Fa')) { + IconComponent = iconSets['fa'][name]; + } else if (name.startsWith('Si')) { + IconComponent = iconSets['si'][name]; } else { IconComponent = iconSets[set][name]; } diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 0fdb1e6..50be5da 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -64,8 +64,9 @@ const socialLinks = [ > {global.initals} + {global.initals} +
@@ -73,8 +74,9 @@ const socialLinks = [
Blog + Blog + @@ -146,8 +148,8 @@ const socialLinks = [
Built with + >Built with + + > +
diff --git a/src/components/ShareButtons.astro b/src/components/ShareButtons.astro index e7481a2..7956de9 100644 --- a/src/components/ShareButtons.astro +++ b/src/components/ShareButtons.astro @@ -29,10 +29,12 @@ const encodedUrl = encodeURIComponent(url); stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4" - > + + + + + + + + + +