Skip to content

Commit

Permalink
Removed duplicated component, fixed hardcoded Image alt (#512)
Browse files Browse the repository at this point in the history
* Removed duplicated comonent with typo in the name.
Fixed hardcoded Image Alt in the Achievements.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Provided default alt attribute value.

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
slyapustin and pre-commit-ci[bot] authored Aug 30, 2022
1 parent da131a1 commit 265cf19
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 33 deletions.
6 changes: 5 additions & 1 deletion src/components/achievementCard/AchievementCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ export default function AchievementCard({cardInfo, isDark}) {
return (
<div className={isDark ? "dark-mode certificate-card" : "certificate-card"}>
<div className="certificate-image-div">
<img src={cardInfo.image} alt="PWA" className="card-image"></img>
<img
src={cardInfo.image}
alt={cardInfo.imageAlt || "Card Thumbnail"}
className="card-image"
></img>
</div>
<div className="certificate-detail-div">
<h5 className={isDark ? "dark-mode card-title" : "card-title"}>
Expand Down
32 changes: 0 additions & 32 deletions src/components/achievementCard/AchivementCard.js

This file was deleted.

1 change: 1 addition & 0 deletions src/containers/achievement/Achievement.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export default function Achievement() {
title: card.title,
description: card.subtitle,
image: card.image,
imageAlt: card.imageAlt,
footer: card.footerLink
}}
/>
Expand Down
3 changes: 3 additions & 0 deletions src/portfolio.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ const achievementSection = {
subtitle:
"First Pakistani to be selected as Google Code-in Finalist from 4000 students from 77 different countries.",
image: require("./assets/images/codeInLogo.webp"),
imageAlt: "Google Code-In Logo",
footerLink: [
{
name: "Certification",
Expand All @@ -276,6 +277,7 @@ const achievementSection = {
subtitle:
"Developed a Google Assistant Action JavaScript Guru that is available on 2 Billion devices world wide.",
image: require("./assets/images/googleAssistantLogo.webp"),
imageAlt: "Google Assistant Action Logo",
footerLink: [
{
name: "View Google Assistant Action",
Expand All @@ -288,6 +290,7 @@ const achievementSection = {
title: "PWA Web App Developer",
subtitle: "Completed Certifcation from SMIT for PWA Web App Development",
image: require("./assets/images/pwaLogo.webp"),
imageAlt: "PWA Logo",
footerLink: [
{name: "Certification", url: ""},
{
Expand Down

1 comment on commit 265cf19

@vercel
Copy link

@vercel vercel bot commented on 265cf19 Aug 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.