Skip to content

Commit

Permalink
chore(about): set badge to multiband
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowballXueQiu committed Aug 16, 2024
1 parent cc645c8 commit 59a3838
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions app/(root)/about/components/DeveloperCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import { Avatar, Badge, Button, Group, Stack, Text, Title } from '@mantine/core'

interface DeveloperCardProps {
name: string;
badge: string;
badges?: string[];
description: string;
links: { name: string; url: string }[];
logo: string;
}

export default function DeveloperCard({
name,
badge,
badges = [], // Provide a default empty array if badges is undefined
description,
links,
logo,
Expand All @@ -20,7 +20,11 @@ export default function DeveloperCard({
<Avatar src={logo} alt={name} size="8rem" />
<Stack>
<Title order={3}>{name}</Title>
<Badge>{badge}</Badge>
<Group>
{badges.map((badge, idx) => (
<Badge key={idx}>{badge}</Badge>
))}
</Group>
<Text>{description}</Text>
<Group>
{links.map((link, idx) => (
Expand Down
4 changes: 2 additions & 2 deletions app/(root)/about/data/data.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"name": "zrll_",
"badge": "Full Stack Developer",
"badges": ["Full Stack Developer", "Mentor"],
"description": "John is a full stack developer with 10 years of experience.",
"links": [
{
Expand All @@ -17,7 +17,7 @@
},
{
"name": "Jane Smith",
"badge": "Frontend Developer",
"badges": ["Frontend Developer", "UI/UX Designer"],
"description": "Jane is a skilled frontend developer with a focus on user experience.",
"links": [
{
Expand Down

0 comments on commit 59a3838

Please sign in to comment.