Update Arms.tsx to support external links

cgen-4e1132d780184431ab11397a7a4ee7e7
This commit is contained in:
Builder.io 2025-11-17 04:55:51 +00:00
parent 2d1a084fc6
commit 58e1c7f1d9
2 changed files with 18 additions and 3 deletions

View file

@ -109,8 +109,12 @@ export default function Arms() {
const location = useLocation();
const [hoveredArm, setHoveredArm] = useState<string | null>(null);
const handleSelectArm = (href: string) => {
navigate(href);
const handleSelectArm = (href: string, external?: boolean) => {
if (external) {
window.open(href, "_blank");
} else {
navigate(href);
}
};
const handleBack = () => {
@ -211,7 +215,7 @@ export default function Arms() {
{ARMS.map((arm) => (
<button
key={arm.id}
onClick={() => handleSelectArm(arm.href)}
onClick={() => handleSelectArm(arm.href, arm.external)}
onMouseEnter={() => setHoveredArm(arm.id)}
onMouseLeave={() => setHoveredArm(null)}
className="group relative p-6 sm:p-8 rounded-2xl border border-gray-800/50 bg-gradient-to-br from-gray-950/60 to-black/80 backdrop-blur-sm hover:border-gray-700 transition-all duration-500 transform hover:scale-105 hover:-translate-y-3"

View file

@ -89,6 +89,17 @@ const ARMS = [
bgGradient: "from-blue-500/20 to-blue-900/20",
borderColor: "border-blue-500/30 hover:border-blue-500/60",
},
{
id: "foundation",
label: "Foundation",
color: "#EF4444",
href: "https://aethex.foundation",
icon: Trophy,
description: "Education & Mentorship",
bgGradient: "from-red-500/20 to-red-900/20",
borderColor: "border-red-500/30 hover:border-red-500/60",
external: true,
},
{
id: "devlink",
label: "Dev-Link",