refactor: simplify home slider and carousel components

- Removed unused DummyContent component and content prop from slider data
- Simplified Card component mapping by removing unnecessary index parameter
- Cleaned up whitespace in apple-cards-carousel component
- Streamlined data structure by removing unused content fields from slider items
This commit is contained in:
2025-10-27 13:50:57 +01:00
parent 3ea9e77a7b
commit 2ebdb14409
2 changed files with 2 additions and 26 deletions

View File

@@ -58,8 +58,6 @@ export const Carousel = ({ items, initialScroll = 0 }: CarouselProps) => {
}
};
return (
<div className="relative w-full">
<div

View File

@@ -5,8 +5,8 @@ import { Carousel, Card } from "@/components/ui/apple-cards-carousel";
import { H2, H3, P } from "@/components/Texts";
export function HomeSlider() {
const cards = data.map((card, index) => (
<Card key={card.src} card={card} index={index} />
const cards = data.map((card) => (
<Card key={card.src} card={card} />
));
return (
@@ -26,22 +26,6 @@ export function HomeSlider() {
);
}
const DummyContent = () => {
return (
<div className="bg-neutral-800 p-8 md:p-14 rounded-3xl mb-4 max-w-3xl">
<P className="text-neutral-400 text-base md:text-2xl font-sans mx-auto">
Mycelium is a decentralized compute network that allows you to run AI models and other software on a global network of devices. Mycelium is built on top of the Mycelium Network, a decentralized network of devices that are connected to each other and to the internet.
</P>
<img
src="/images/gallery/1.webp"
alt="Macbook mockup from Aceternity UI"
height="500"
width="500"
className="md:w-1/2 md:h-1/2 h-full w-full mx-auto object-cover"
/>
</div>
);
};
import networkImage from "@/images/slider/network1.jpg";
import agentImage from "@/images/slider/agent1.jpg";
@@ -56,7 +40,6 @@ const data = [
title: "Mycelium Network",
description: "A decentralized network for distributed computing.",
src: "/images/gallery/9.webp",
content: <DummyContent />,
bg: networkImage,
link: "/network",
},
@@ -65,7 +48,6 @@ const data = [
title: "Mycelium Agent",
description: "An intelligent agent for task automation.",
src: "/images/gallery/2.webp",
content: <DummyContent />,
bg: agentImage,
link: "/agent",
},
@@ -74,7 +56,6 @@ const data = [
title: "Mycelium Cloud",
description: "Decentralized cloud storage and services.",
src: "/images/gallery/3.webp",
content: <DummyContent />,
bg: cloudImage,
link: "/cloud",
},
@@ -84,7 +65,6 @@ const data = [
title: "Mycelium GPU",
description: "Access to a global network of GPUs.",
src: "/images/gallery/4.webp",
content: <DummyContent />,
bg: gpuImage,
link: "/gpu",
},
@@ -93,7 +73,6 @@ const data = [
title: "Mycelium Compute",
description: "Run computations on a distributed network.",
src: "/images/gallery/5.webp",
content: <DummyContent />,
bg: computeImage,
link: "/compute",
},
@@ -102,7 +81,6 @@ const data = [
title: "Mycelium Storage",
description: "Secure and decentralized data storage.",
src: "/images/gallery/6.webp",
content: <DummyContent />,
bg: storageImage,
link: "/storage",
},