mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-12 07:43:10 +10:00
fix issue with missing DialogTitle/DialogDescription, fix issue with hot reloads
This commit is contained in:
@ -1,17 +1,24 @@
|
||||
import { forwardRef } from "react";
|
||||
|
||||
type BrandIconProps = {
|
||||
slug: string;
|
||||
};
|
||||
|
||||
export const BrandIcon = ({ slug }: BrandIconProps) => {
|
||||
export const BrandIcon = forwardRef<HTMLImageElement, BrandIconProps>(({ slug }, ref) => {
|
||||
if (slug === "linkedin") {
|
||||
return (
|
||||
<img
|
||||
alt="linkedin"
|
||||
ref={ref}
|
||||
alt="LinkedIn"
|
||||
className="size-4"
|
||||
src={`${window.location.origin}/support-logos/linkedin.svg`}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return <img alt={slug} className="size-4" src={`https://cdn.simpleicons.org/${slug}`} />;
|
||||
};
|
||||
return (
|
||||
<img ref={ref} alt={slug} className="size-4" src={`https://cdn.simpleicons.org/${slug}`} />
|
||||
);
|
||||
});
|
||||
|
||||
BrandIcon.displayName = "BrandIcon";
|
||||
|
||||
Reference in New Issue
Block a user