Skip to content

Commit

Permalink
fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bcotrim committed Jun 14, 2024
1 parent 43facef commit d23f34b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9,541 deletions.
9 changes: 5 additions & 4 deletions components/about.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
faLinkedin,
faTwitter,
} from "@fortawesome/free-brands-svg-icons";
import { Icon } from "@fortawesome/fontawesome-svg-core";

const About: React.FC = () => (
<section
Expand All @@ -40,7 +41,7 @@ const About: React.FC = () => (
<a href="https://github.com/bcotrim" target="_blank" rel="noreferrer">
<FontAwesomeIcon
className="text-gray-300 text-3xl lg:text-xl"
icon={faGithub}
icon={faGithub as Icon}
/>
</a>
<a
Expand All @@ -50,7 +51,7 @@ const About: React.FC = () => (
>
<FontAwesomeIcon
className="text-gray-300 text-3xl lg:text-xl"
icon={faLinkedin}
icon={faLinkedin as Icon}
/>
</a>
<a
Expand All @@ -60,13 +61,13 @@ const About: React.FC = () => (
>
<FontAwesomeIcon
className="text-gray-300 text-3xl lg:text-xl"
icon={faTwitter}
icon={faTwitter as Icon}
/>
</a>
<a href="/BernardoCotrimCV.pdf" target="_blank" rel="noreferrer">
<FontAwesomeIcon
className="text-gray-300 text-3xl lg:text-xl"
icon={faFilePdf}
icon={faFilePdf as Icon}
/>
</a>
</div>
Expand Down
5 changes: 3 additions & 2 deletions components/equipment.slot.component.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { IconDefinition } from "@fortawesome/fontawesome-common-types";
import { Icon } from "@fortawesome/fontawesome-svg-core";
import {
faChild,
faHandPaper,
Expand Down Expand Up @@ -29,13 +30,13 @@ const EquipmentSlot: React.FC<Props> = ({ slot, icon, label }) => (
<div className="text-base text-gray-300 flex flex-row">
<span className="w-10 text-center">
<FontAwesomeIcon
icon={SlotMap[slot].icon}
icon={SlotMap[slot].icon as Icon}
className={`text-lg mr-1 text-gray-500 ${SlotMap[slot].class}`}
/>
</span>
<span className="w-2 text-left">:</span>
<span className="w-10 text-center">
<FontAwesomeIcon icon={icon} className="text-lg mr-1 text-gray-300" />
<FontAwesomeIcon icon={icon as Icon} className="text-lg mr-1 text-gray-300" />
</span>
<span>{label}</span>
</div>
Expand Down
4 changes: 2 additions & 2 deletions components/experience.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ type Props = {
experience: Experience;
};

const Experience: React.FC<Props> = ({ experience }) => (
const ExperienceComponent: React.FC<Props> = ({ experience }) => (
<>
<div
className={
Expand Down Expand Up @@ -40,4 +40,4 @@ const Experience: React.FC<Props> = ({ experience }) => (
</>
);

export default React.memo(Experience);
export default React.memo(ExperienceComponent);
4 changes: 2 additions & 2 deletions components/skill.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import useOnScreen from "../utils/use.on.screen";

type Props = { skill: Skill };

const Skill: React.FC<Props> = ({ skill: { icon, value, title } }) => {
const SkillComponent: React.FC<Props> = ({ skill: { icon, value, title } }) => {
const ref = useRef<HTMLElement>(null);
const isVisible = useOnScreen<HTMLElement>(ref);

Expand All @@ -26,4 +26,4 @@ const Skill: React.FC<Props> = ({ skill: { icon, value, title } }) => {
);
};

export default React.memo(Skill);
export default React.memo(SkillComponent);
2 changes: 1 addition & 1 deletion components/work.component.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from "react";
import { AboutSection, Experience } from ".";
import { Experience } from ".";
import { EXPERIENCES } from "../data/experience";

const Work: React.FC = () => (
Expand Down
Loading

0 comments on commit d23f34b

Please sign in to comment.