diff --git a/src/components/cardStack/layouts/grid/GridLayout.tsx b/src/components/cardStack/layouts/grid/GridLayout.tsx
index f308c49..45bba32 100644
--- a/src/components/cardStack/layouts/grid/GridLayout.tsx
+++ b/src/components/cardStack/layouts/grid/GridLayout.tsx
@@ -1,150 +1,15 @@
-"use client";
+import { useCardAnimation } from '../../hooks/useCardAnimation';
-import { memo, Children } from "react";
-import CardStackTextBox from "../../CardStackTextBox";
-import { cls } from "@/lib/utils";
-import { GridLayoutProps } from "../../types";
-import { gridConfigs } from "./gridConfigs";
-import { useCardAnimation } from "../../hooks/useCardAnimation";
+export function GridLayout() {
+ const { animate, itemRefs, containerRef, perspectiveRef, bottomContentRef } = useCardAnimation();
-const GridLayout = ({
- children,
- itemCount,
- gridVariant = "uniform-all-items-equal",
- uniformGridCustomHeightClasses,
- gridRowsClassName,
- itemHeightClassesOverride,
- animationType,
- supports3DAnimation = false,
- title,
- titleSegments,
- description,
- tag,
- tagIcon,
- tagAnimation,
- buttons,
- buttonAnimation,
- textboxLayout = "default",
- useInvertedBackground,
- bottomContent,
- className = "",
- containerClassName = "",
- gridClassName = "",
- textBoxClassName = "",
- titleClassName = "",
- titleImageWrapperClassName = "",
- titleImageClassName = "",
- descriptionClassName = "",
- tagClassName = "",
- buttonContainerClassName = "",
- buttonClassName = "",
- buttonTextClassName = "",
- ariaLabel,
-}: GridLayoutProps) => {
- // Get config for this variant and item count
- const config = gridConfigs[gridVariant]?.[itemCount];
+ const handleAnimate = () => {
+ animate(0);
+ };
- // Fallback to default uniform grid if no config
- const gridColsMap = {
- 1: "md:grid-cols-1",
- 2: "md:grid-cols-2",
- 3: "md:grid-cols-3",
- 4: "md:grid-cols-4",
- };
- const defaultGridCols = gridColsMap[itemCount as keyof typeof gridColsMap] || "md:grid-cols-4";
-
- // Use config values or fallback
- const gridCols = config?.gridCols || defaultGridCols;
- const gridRows = gridRowsClassName || config?.gridRows || "";
- const itemClasses = config?.itemClasses || [];
- const itemHeightClasses = itemHeightClassesOverride || config?.itemHeightClasses || [];
- const heightClasses = uniformGridCustomHeightClasses || config?.heightClasses || "";
- const itemWrapperClass = config?.itemWrapperClass || "";
-
- const childrenArray = Children.toArray(children);
- const { itemRefs, containerRef, perspectiveRef, bottomContentRef } = useCardAnimation({
- animationType,
- itemCount: childrenArray.length,
- isGrid: true,
- supports3DAnimation,
- gridVariant
- });
-
- return (
-