11---
2- import { Github , Paperclip , Youtube } from " @lucide/astro" ;
2+ import { Github , Paperclip , Twitch , Youtube } from " @lucide/astro" ;
33
4- const { name, image, description, apply, github, youtube } = Astro .props ;
4+ const { name, image, description, apply, github, youtube, twitch } =
5+ Astro .props ;
56---
67
78<div
@@ -18,7 +19,7 @@ const { name, image, description, apply, github, youtube } = Astro.props;
1819 <>
1920 { github && (
2021 <button
21- class = " member-github-link px-4 py-2 flex items-center gap-2 border border-(--background-lightest) rounded-lg cursor-pointer transition-all duration-200 ease-in-out hover:bg-(--background) hover:brightness-125"
22+ class = " member-github-link px-4 py-2 flex items-center gap-2 border border-(--background-lightest) rounded-lg cursor-pointer transition-all duration-200 ease-in-out hover:bg-(--background-lighter ) hover:brightness-125"
2223 data-github = { github }
2324 >
2425 <Github class = " w-6 h-6" />
@@ -27,20 +28,29 @@ const { name, image, description, apply, github, youtube } = Astro.props;
2728 )}
2829 { youtube && (
2930 <button
30- class = " member-youtube-link px-4 py-2 flex items-center gap-2 border border-(--background-lightest) rounded-lg cursor-pointer transition-all duration-200 ease-in-out hover:bg-(--background) hover:brightness-125"
31+ class = " member-youtube-link px-4 py-2 flex items-center gap-2 border border-(--background-lightest) rounded-lg cursor-pointer transition-all duration-200 ease-in-out hover:bg-(--background-lighter ) hover:brightness-125"
3132 data-youtube = { youtube }
3233 >
3334 <Youtube class = " w-6 h-6" />
3435 <p >YouTube</p >
3536 </button >
3637 )}
38+ { twitch && (
39+ <button
40+ class = " member-twitch-link px-4 py-2 flex items-center gap-2 border border-(--background-lightest) rounded-lg cursor-pointer transition-all duration-200 ease-in-out hover:bg-(--background-lighter) hover:brightness-125"
41+ data-twitch = { twitch }
42+ >
43+ <Twitch class = " w-6 h-6" />
44+ <p >Twitch</p >
45+ </button >
46+ )}
3747 </>
3848 )
3949 }
4050 {
4151 apply && (
4252 <button
43- class = " member-apply-link px-4 py-2 flex items-center gap-2 border border-(--background-lightest) rounded-lg cursor-pointer transition-all duration-200 ease-in-out hover:bg-(--background) hover:brightness-125"
53+ class = " member-apply-link px-4 py-2 flex items-center gap-2 border border-(--background-lightest) rounded-lg cursor-pointer transition-all duration-200 ease-in-out hover:bg-(--background-lighter ) hover:brightness-125"
4454 data-apply = { apply }
4555 >
4656 <Paperclip class = " w-6 h-6" />
@@ -75,4 +85,13 @@ const { name, image, description, apply, github, youtube } = Astro.props;
7585 }
7686 });
7787 });
88+
89+ document.querySelectorAll(".member-twitch-link").forEach((btn) => {
90+ btn.addEventListener("click", () => {
91+ const twitch = (btn as HTMLElement).dataset.twitch;
92+ if (twitch) {
93+ window.open(`https://twitch.tv/${twitch}`, "_blank");
94+ }
95+ });
96+ });
7897</script >
0 commit comments