Skip to content

Commit

Permalink
fix: add title to work icon on maintainer card
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivo committed Apr 21, 2023
1 parent 6fb771b commit 8fa963d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
7 changes: 6 additions & 1 deletion apps/client/public/locales/en-US/about.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"active": "Active",
"inactive": "Previous"
},
"title": "About"
"title": "About",
"work": {
"code": "Code development",
"idea": "Idea and concept",
"manuscript": "Publication writing"
}
}
21 changes: 16 additions & 5 deletions apps/client/src/components/MaintainerCard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Code, Lightbulb, Newspaper } from "lucide-react";
import { Code2, Lightbulb, Newspaper } from "lucide-react";
import Link from "next/link";
import { useTranslation } from "next-i18next";

import { BlurImage } from "../BlurImage";

Expand All @@ -8,12 +9,20 @@ interface MaintainerCardProps {
}

export function MaintainerCard({ maintainer }: MaintainerCardProps) {
const { t } = useTranslation(["about"]);

const WorkIcon = {
idea: Lightbulb,
code: Code,
code: Code2,
manuscript: Newspaper
};

const WorkTitle = {
idea: "about:work.idea",
code: "about:work.code",
manuscript: "about:work.manuscript"
};

return (
<Link
href={maintainer.link ?? "#"}
Expand Down Expand Up @@ -45,10 +54,12 @@ export function MaintainerCard({ maintainer }: MaintainerCardProps) {
const Icon = WorkIcon[w];

return (
<Icon
className="h-5 w-5"
<p
key={maintainer.name + w}
/>
title={t(WorkTitle[w])}
>
<Icon className="stroke-primary-600 stroke-[1] h-5 w-5" />
</p>
);
})
: null}
Expand Down
8 changes: 5 additions & 3 deletions apps/client/src/pages/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,21 @@ export const getServerSideProps = withSSRTranslations(undefined, {
const maintainers: Maintainer[] = [
{
name: "Dr. Fernando Berton Zanchi",
active: true,
link: "http://lattes.cnpq.br/0564343474986429",
image: "/images/maintainers/fernando.jpg",
active: true,
work: ["idea", "code", "manuscript"]
},
{
name: "Dr. Rafael Andrade Caceres",
active: true,
link: "http://lattes.cnpq.br/2268580664900763",
image: "/images/maintainers/rafael.jpg",
active: true,
work: ["idea", "manuscript"]
},
{
name: "Ivo Henrique Provensi Vieira",
link: "https://github.com/ivopr",
link: "http://lattes.cnpq.br/5130583751808996",
image: "/images/maintainers/ivo.jpg",
active: true,
work: ["code"]
Expand Down

0 comments on commit 8fa963d

Please sign in to comment.