Skip to content

Commit 6377fe1

Browse files
fix: replace removed Github icon from lucide-react v1 with custom SVG (#137)
lucide-react v1 removed brand icons including Github. Replace usages in footer.tsx, member.tsx, and HomePage.tsx with a shared GithubIcon SVG component. Also update lucide-react to ^1.0.0 in package.json and regenerate pnpm-lock.yaml. Agent-Logs-Url: https://github.com/TUM-Dev/Website/sessions/21bfc73e-5b9e-45d3-b523-28aa91ad2ac4 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: kordianbruck <298860+kordianbruck@users.noreply.github.com>
1 parent d5d9e33 commit 6377fe1

6 files changed

Lines changed: 26 additions & 13 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"cmdk": "1.1.1",
3636
"date-fns": "4.1.0",
3737
"embla-carousel-react": "8.6.0",
38-
"lucide-react": "^0.577.0",
38+
"lucide-react": "^1.0.0",
3939
"next-themes": "^0.4.6",
4040
"react": "^19.1.1",
4141
"react-dom": "^19.1.1",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/footer.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { Code, FileText, Github, Mail, ShieldCheck } from "lucide-react";
1+
import { Code, FileText, Mail, ShieldCheck } from "lucide-react";
2+
import { GithubIcon } from "./ui/github-icon";
23
import { Link } from "react-router-dom";
34

45
export const Footer = () => {
@@ -60,7 +61,7 @@ export const Footer = () => {
6061
target="_blank"
6162
rel="noopener noreferrer"
6263
>
63-
<Github className="w-4 h-4 mr-2" />
64+
<GithubIcon className="w-4 h-4 mr-2" />
6465
GitHub
6566
</a>
6667
<Link

src/components/member.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Github } from "lucide-react";
1+
import { GithubIcon } from "./ui/github-icon";
22
import { Card, CardContent } from "./ui/card";
33

44
export interface MemberProps {
@@ -48,7 +48,7 @@ export const Member: React.FC<MemberProps> = ({
4848
target="_blank"
4949
rel="noopener noreferrer"
5050
>
51-
<Github className="w-4 h-4" />
51+
<GithubIcon className="w-4 h-4" />
5252
</a>
5353
)}
5454
{linkedin && (

src/components/ui/github-icon.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import type { SVGProps } from "react";
2+
3+
export const GithubIcon = (props: SVGProps<SVGSVGElement>) => (
4+
<svg
5+
aria-hidden="true"
6+
fill="currentColor"
7+
viewBox="0 0 24 24"
8+
{...props}
9+
>
10+
<path d="M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.509 11.509 0 0 1 12 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12z" />
11+
</svg>
12+
);

src/pages/HomePage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import {
22
Calendar,
33
CalendarIcon,
44
Code,
5-
Github,
65
Lightbulb,
76
Mail,
87
MapPin,
98
Users,
109
Users2,
1110
} from "lucide-react";
1211
import { Link } from "react-router-dom";
12+
import { GithubIcon } from "@/components/ui/github-icon";
1313
import { Event, type EventProps } from "@/components/event";
1414
import type { MemberProps } from "@/components/member";
1515
import { Member } from "@/components/member";
@@ -364,7 +364,7 @@ export default function HomePage() {
364364
variant="outline"
365365
>
366366
<a href="#projects">
367-
<Github className="w-5 h-5 mr-2" />
367+
<GithubIcon className="w-5 h-5 mr-2" />
368368
Unsere Projekte
369369
</a>
370370
</Button>
@@ -573,7 +573,7 @@ export default function HomePage() {
573573
variant="secondary"
574574
>
575575
<a href="#projects">
576-
<Github className="w-4 h-4 mr-2" />
576+
<GithubIcon className="w-4 h-4 mr-2" />
577577
Projekte ansehen
578578
</a>
579579
</Button>

0 commit comments

Comments
 (0)