Skip to content

Commit

Permalink
fix: apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
styrix560 committed Oct 29, 2024
1 parent 891972b commit 82060d9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
16 changes: 8 additions & 8 deletions src/assets/data/team.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
{
"img": "/src/assets/img/team/Jonas Wanke.webp",
"name": "Jonas Wanke",
"lastRole": { "en": "Expert", "de": "Experte" },
"skill": "Skill 08",
"lastRole": { "en": "Expert", "de": "Bundestrainer" },
"skill": "Mobile Applications Development",
"hasMultipleRoles": true
},
{
"img": "/src/assets/img/team/Dr. Olaf Kappler.webp",
"name": "Dr. Olaf Kappler",
"lastRole": { "en": "Expert", "de": "Experte" },
"skill": "Skill 09"
"lastRole": { "en": "Expert", "de": "Bundestrainer" },
"skill": "IT Software Solutions for Business"
},
{
"img": "/src/assets/img/team/Doreen Kappler.webp",
Expand All @@ -26,8 +26,8 @@
{
"img": "/src/assets/img/team/Glenn Skrzypczak.webp",
"name": "Glenn Skrzypczak",
"lastRole": { "en": "Expert", "de": "Experte" },
"skill": "Skill 17",
"lastRole": { "en": "Expert", "de": "Bundestrainer" },
"skill": "Web Technologies",
"hasMultipleRoles": true
},
{
Expand Down Expand Up @@ -55,12 +55,12 @@
{
"img": "/src/assets/img/team/Kai Redmann.webp",
"name": "Kai Redmann",
"lastRole": { "en": "Workshop Manager", "de": "Workshop Manager" }
"lastRole": { "en": "Workshop-Manager", "de": "Workshop Manager" }
},
{
"img": "/src/assets/img/team/Lukas Fischer.webp",
"name": "Lukas Fischer",
"lastRole": { "en": "Workshop Manager", "de": "Workshop Manager" }
"lastRole": { "en": "Workshop-Manager", "de": "Workshop Manager" }
},
{
"img": "/src/assets/img/team/Thomas Steinfeld.webp",
Expand Down
3 changes: 2 additions & 1 deletion src/components/team/Person.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
import { getLangFromUrl, useTranslations } from "~/i18n/utils";
import { PersonImage } from "./PersonImage";
import type { Language } from "~/i18n";
interface Props {
name: string;
lastRole: { de: string; en: string };
lastRole: Record<Language, string>;
img?: string;
skill?: string;
hasMultipleRoles?: boolean;
Expand Down
8 changes: 6 additions & 2 deletions src/components/team/PersonImage.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import clsx from "clsx";

export type PersonImageProps = {
img?: string;
};

export const PersonImage = ({ img }: PersonImageProps) => {
const padding = !img ? "p-5" : "";
return (
<img
className={`mx-auto h-40 w-40 rounded-full object-cover shadow-lg xl:h-56 xl:w-56 ${padding}`}
className={clsx(
`mx-auto h-40 w-40 rounded-full object-cover shadow-lg xl:h-56 xl:w-56`,
!img && "p-5",
)}
src={img ?? "/imgs/wsg/wsg_hands.svg"}
alt=""
/>
Expand Down

0 comments on commit 82060d9

Please sign in to comment.