Update dependencies, social icons, and PR deploys - #10
Conversation
There was a problem hiding this comment.
Code Review
This pull request upgrades several dependencies and introduces a new SocialIcon component to render inline SVGs instead of importing individual Lucide icons directly. The review feedback suggests defining a Props interface for the SocialIcon component to improve type safety and using as const on the socialLinks array to ensure correct literal type inference for the icon names.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| --- | ||
| const { name, size = 24, class: className, ...attrs } = Astro.props; |
There was a problem hiding this comment.
Adding a Props interface to the SocialIcon component improves type safety and provides autocomplete in editors. It also prevents potential TypeScript compilation errors when indexing the icons object with a dynamic name string.
---
interface Props {
name: "github" | "linkedin" | "twitter";
size?: number;
class?: string;
[key: string]: any;
}
const { name, size = 24, class: className, ...attrs } = Astro.props;
| const socialLinks = [ | ||
| { | ||
| href: "https://github.com/joshymcd", // Replace with your GitHub URL | ||
| label: "GitHub", | ||
| icon: Github, | ||
| icon: "github", | ||
| }, | ||
| { | ||
| href: "https://linkedin.com/in/joshmcdonald92", // Replace with your LinkedIn URL | ||
| label: "LinkedIn", | ||
| icon: Linkedin, | ||
| icon: "linkedin", | ||
| }, | ||
| { | ||
| href: "https://x.com/joshymcd92", // Replace with your X/Twitter URL | ||
| label: "Twitter", // Changed label | ||
| icon: Twitter, // Changed icon from X to Twitter | ||
| icon: "twitter", | ||
| }, | ||
| ]; |
There was a problem hiding this comment.
Using as const on the socialLinks array ensures that the icon property is inferred as the literal types "github" | "linkedin" | "twitter" instead of a generic string. This prevents TypeScript type mismatch errors when passing link.icon to the typed SocialIcon component.
const socialLinks = [
{
href: "https://github.com/joshymcd", // Replace with your GitHub URL
label: "GitHub",
icon: "github",
},
{
href: "https://linkedin.com/in/joshmcdonald92", // Replace with your LinkedIn URL
label: "LinkedIn",
icon: "linkedin",
},
{
href: "https://x.com/joshymcd92", // Replace with your X/Twitter URL
label: "Twitter", // Changed label
icon: "twitter",
},
] as const;
Summary
Verification