From 9d8f1a6919357587a9d7d081cece60e083b3c376 Mon Sep 17 00:00:00 2001 From: sasha-astiadi Date: Fri, 31 Oct 2025 15:35:45 +0100 Subject: [PATCH] refactor: replace MagicCard with DarkCard component - Replaced MagicCard with new DarkCard component across apple-cards-carousel and HomeGlobe - Updated card styling and layout in apple-cards-carousel to work with DarkCard - Removed gradient and border styling from globe stats cards - Adjusted padding and margin values to maintain consistent appearance - Fixed spacing and alignment of chevron icon in cards --- src/components/ui/apple-cards-carousel.tsx | 19 ++++++++------ src/components/ui/cards.tsx | 19 ++++++++++++++ src/pages/home/HomeGlobe.tsx | 30 +++++++--------------- 3 files changed, 39 insertions(+), 29 deletions(-) create mode 100644 src/components/ui/cards.tsx diff --git a/src/components/ui/apple-cards-carousel.tsx b/src/components/ui/apple-cards-carousel.tsx index b151594..5f51780 100644 --- a/src/components/ui/apple-cards-carousel.tsx +++ b/src/components/ui/apple-cards-carousel.tsx @@ -11,6 +11,7 @@ import { import { cn } from "@/lib/utils"; import { Link } from "react-router-dom"; import { motion } from "motion/react"; +import { DarkCard } from "./cards"; interface CarouselProps { items: JSX.Element[]; @@ -129,11 +130,12 @@ export const Card = ({ }) => { return ( - -
+ + +
{card.description} -
- +
+
@@ -162,7 +164,8 @@ export const Card = ({ className="h-full w-full origin-bottom-right scale-75 object-contain mb-10" />
-
+ + ); }; diff --git a/src/components/ui/cards.tsx b/src/components/ui/cards.tsx new file mode 100644 index 0000000..13d6b23 --- /dev/null +++ b/src/components/ui/cards.tsx @@ -0,0 +1,19 @@ +import * as React from "react"; +import { cn } from "@/lib/utils"; + +const DarkCard = React.forwardRef< + HTMLDivElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
+)); +DarkCard.displayName = "DarkCard"; + +export { DarkCard }; diff --git a/src/pages/home/HomeGlobe.tsx b/src/pages/home/HomeGlobe.tsx index ae261e2..43cdd73 100644 --- a/src/pages/home/HomeGlobe.tsx +++ b/src/pages/home/HomeGlobe.tsx @@ -4,7 +4,7 @@ import { Globe } from "@/components/ui/Globe" import { motion } from "framer-motion" import { P, CT, CP, SectionHeader, Eyebrow } from "@/components/Texts" import { CountUpNumber } from '@/components/CountUpNumber' -import { MagicCard } from '@/components/magicui/magic-card' +import { DarkCard } from "@/components/ui/cards"; export function WorldMap() { return ( @@ -65,16 +65,13 @@ export function WorldMap() { transition={{ duration: 0.5, delay: 0.4, ease: "easeOut" }} className="lg:absolute lg:top-12 lg:-left-12 w-80" > - +
CORES
Total Central Processing Unit Cores available on the grid. -
+ - +
NODES
Total number of nodes on the grid. -
+
- +
SSD CAPACITY
Total GB amount of storage (SSD, HDD, & RAM) on the grid. -
+
- +
COUNTRIES
Total number of countries with active nodes. -
+