From 8b4e0defb9b0a2382c67787f29c327fab2dad1a6 Mon Sep 17 00:00:00 2001
From: sasha-astiadi
Date: Thu, 6 Nov 2025 20:28:13 +0100
Subject: [PATCH] refactor: extract bento cards into data-driven component
- Replaced hardcoded card markup with array-based configuration for maintainability
- Added Link components to enable navigation to individual product pages
- Implemented hover animation for improved user interaction
---
src/pages/home/HomeTab.tsx | 212 +++++++++++++++++--------------------
1 file changed, 95 insertions(+), 117 deletions(-)
diff --git a/src/pages/home/HomeTab.tsx b/src/pages/home/HomeTab.tsx
index 5292f53..2f2137f 100644
--- a/src/pages/home/HomeTab.tsx
+++ b/src/pages/home/HomeTab.tsx
@@ -1,8 +1,83 @@
"use client";
-import { useState } from "react";
+import { Link } from "react-router-dom";
import { Eyebrow, H3, P } from "@/components/Texts";
+const bentoCards = [
+ {
+ id: 'network',
+ title: 'Mycelium Network',
+ eyebrow: 'Network',
+ description: 'Encrypted peer-to-peer mesh networking across the globe.',
+ image: '/images/bento-network.png',
+ link: '/network',
+ colSpan: 'lg:col-span-3',
+ rowSpan: 'lg:row-span-1',
+ rounded: 'lg:rounded-tl-4xl max-lg:rounded-t-4xl',
+ innerRounded: 'lg:rounded-tl-[calc(2rem+1px)] max-lg:rounded-t-[calc(2rem+1px)]'
+ },
+ {
+ id: 'agents',
+ title: 'Mycelium Agents',
+ eyebrow: 'Agents',
+ description: 'Private, programmable AI systems that run on your hardware.',
+ image: '/images/bento-agent.jpg',
+ link: '/agents',
+ colSpan: 'lg:col-span-3',
+ rowSpan: 'lg:row-span-1',
+ rounded: 'lg:rounded-tr-4xl',
+ innerRounded: 'lg:rounded-tr-[calc(2rem+1px)]'
+ },
+ {
+ id: 'cloud',
+ title: 'Mycelium Cloud',
+ eyebrow: 'Cloud',
+ description: 'Deploy Kubernetes clusters on sovereign infrastructure.',
+ image: '/images/bento-cloud.jpg',
+ link: '/cloud',
+ colSpan: 'lg:col-span-6',
+ rowSpan: 'lg:row-span-1',
+ rounded: 'rounded-lg',
+ innerRounded: 'rounded-[calc(var(--radius-lg)+1px)]'
+ },
+ {
+ id: 'compute',
+ title: 'Mycelium Compute',
+ eyebrow: 'Compute',
+ description: 'The Compute resource layers powering the stack.',
+ image: '/images/bento-compute.png',
+ link: '/compute',
+ colSpan: 'lg:col-span-2',
+ rowSpan: 'lg:row-span-1',
+ rounded: 'lg:rounded-bl-4xl',
+ innerRounded: 'lg:rounded-bl-[calc(2rem+1px)]'
+ },
+ {
+ id: 'storage',
+ title: 'Mycelium Storage',
+ eyebrow: 'Storage',
+ description: 'The Storage resource layers powering the stack.',
+ image: '/images/bento-storage.png',
+ link: '/storage',
+ colSpan: 'lg:col-span-2',
+ rowSpan: 'lg:row-span-1',
+ rounded: 'rounded-lg',
+ innerRounded: 'rounded-[calc(var(--radius-lg)+1px)]'
+ },
+ {
+ id: 'gpu',
+ title: 'Mycelium GPU',
+ eyebrow: 'GPU',
+ description: 'The GPU resource layers powering the stack.',
+ image: '/images/bento-gpu.jpg',
+ link: '/gpu',
+ colSpan: 'lg:col-span-2',
+ rowSpan: 'lg:row-span-1',
+ rounded: 'lg:rounded-br-4xl max-lg:rounded-b-4xl',
+ innerRounded: 'lg:rounded-br-[calc(2rem+1px)] max-lg:rounded-b-[calc(2rem+1px)]'
+ },
+];
+
export function HomeTab() {
return (
@@ -21,123 +96,26 @@ export function HomeTab() {
-
- {/* ✅ TOP ROW */}
-
-
-
-

-
-
Network
-
Mycelium Network
-
- Encrypted peer-to-peer mesh networking across the globe.
-
+ {bentoCards.map((card) => (
+
+
+
+

+
+
{card.eyebrow}
+
{card.title}
+
+ {card.description}
+
+
-
-
-
-
-
-
-
-

-
-
Agents
-
Mycelium Agents
-
- Private, programmable AI systems that run on your hardware.
-
-
-
-
-
-
- {/* ✅ ✅ MIDDLE ROW (half-height, equal spacing) */}
-
-
-
-

-
-
Agents
-
Mycelium Cloud
-
- Private, programmable AI systems that run on your hardware.
-
-
-
-
-
-
- {/* ✅ BOTTOM ROW */}
-
-
-
-

-
-
Compute
-
Mycelium Compute
-
- The Compute resource layers powering the stack.
-
-
-
-
-
-
-
-
-
-

-
-
Storage
-
Mycelium Storage
-
- The Storage resource layers powering the stack.
-
-
-
-
-
-
-
-
-
-

-
-
GPU
-
Mycelium GPU
-
- The GPU resource layers powering the stack.
-
-
-
-
-
+
+
+ ))}