From 9e6b29fd01e9b5632694463bab4241d95a19d46c Mon Sep 17 00:00:00 2001 From: Cristian Felipe Cruz Buitron Date: Sun, 26 Jul 2026 17:04:17 -0500 Subject: [PATCH] chore(gitops): remove misplaced frontend sources [skip ci] --- .../integration/app-catalog-page.example.tsx | 39 --------- .../catalog/CatalogRouteBoundary.tsx | 29 ------- .../navigation/CategoryMenu.module.css | 87 ------------------- .../components/navigation/CategoryMenu.tsx | 87 ------------------- 4 files changed, 242 deletions(-) delete mode 100644 workloads/ecommerce/integration/app-catalog-page.example.tsx delete mode 100644 workloads/ecommerce/src/components/catalog/CatalogRouteBoundary.tsx delete mode 100644 workloads/ecommerce/src/components/navigation/CategoryMenu.module.css delete mode 100644 workloads/ecommerce/src/components/navigation/CategoryMenu.tsx diff --git a/workloads/ecommerce/integration/app-catalog-page.example.tsx b/workloads/ecommerce/integration/app-catalog-page.example.tsx deleted file mode 100644 index cec5fae..0000000 --- a/workloads/ecommerce/integration/app-catalog-page.example.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import { Suspense } from "react"; -import CatalogRouteBoundary from "@/components/catalog/CatalogRouteBoundary"; - -// Conserva aquí los imports actuales de tu página: -// import CatalogClient from "..."; -// import { getProducts } from "..."; - -type CatalogPageProps = { - searchParams: Promise>; -}; - -export default async function CatalogPage({ - searchParams, -}: CatalogPageProps) { - const params = await searchParams; - - // Conserva aquí la carga de datos actual de tu proyecto. - // const products = await getProducts(); - - return ( - - - {/* - Sustituye este comentario por el contenido actual del catálogo. - - Ejemplo: - - */} -
-          {JSON.stringify(params)}
-        
-
-
- ); -} \ No newline at end of file diff --git a/workloads/ecommerce/src/components/catalog/CatalogRouteBoundary.tsx b/workloads/ecommerce/src/components/catalog/CatalogRouteBoundary.tsx deleted file mode 100644 index 6b11af4..0000000 --- a/workloads/ecommerce/src/components/catalog/CatalogRouteBoundary.tsx +++ /dev/null @@ -1,29 +0,0 @@ -"use client"; - -import type { ReactNode } from "react"; -import { usePathname, useSearchParams } from "next/navigation"; - -type CatalogRouteBoundaryProps = { - children: ReactNode; -}; - -/** - * Fuerza el remontaje del árbol del catálogo cuando cambia: - * - pathname - * - category - * - collection - * - section - * - búsqueda, orden u otros parámetros - * - * Esto evita que useState/useMemo conserven filtros de una navegación anterior. - */ -export default function CatalogRouteBoundary({ - children, -}: CatalogRouteBoundaryProps) { - const pathname = usePathname(); - const searchParams = useSearchParams(); - - const navigationKey = `${pathname}?${searchParams.toString()}`; - - return
{children}
; -} \ No newline at end of file diff --git a/workloads/ecommerce/src/components/navigation/CategoryMenu.module.css b/workloads/ecommerce/src/components/navigation/CategoryMenu.module.css deleted file mode 100644 index 7da0d07..0000000 --- a/workloads/ecommerce/src/components/navigation/CategoryMenu.module.css +++ /dev/null @@ -1,87 +0,0 @@ -"use client"; - -import { usePathname, useSearchParams } from "next/navigation"; -import styles from "./CategoryMenu.module.css"; - -type MenuItem = { - label: string; - href: string; -}; - -/** - * Menú principal ARI Shopping. - * - * Hotfix de estabilidad: - * Se utilizan enlaces HTML nativos para que cada cambio de categoría - * realice una navegación completa. Esto evita conservar estados obsoletos - * del catálogo cuando únicamente cambia el query string. - */ -const MENU_ITEMS: readonly MenuItem[] = [ - { - label: "Juguetes para bebés", - href: "/catalog?category=Figuras", - }, - { - label: "Educativos", - href: "/catalog?category=Figuras§ion=educativos", - }, - { - label: "Muñecas y peluches", - href: "/catalog?category=Peluches", - }, - { - label: "Acción y aventura", - href: "/catalog?collection=Marvel", - }, - { - label: "Mochilas", - href: "/catalog?category=Mochilas", - }, - { - label: "Variedades", - href: "/catalog", - }, -]; - -function normalizeUrl(pathname: string, query: string): string { - return query ? `${pathname}?${query}` : pathname; -} - -export default function CategoryMenu() { - const pathname = usePathname(); - const searchParams = useSearchParams(); - const currentUrl = normalizeUrl(pathname, searchParams.toString()); - - return ( - - ); -} \ No newline at end of file diff --git a/workloads/ecommerce/src/components/navigation/CategoryMenu.tsx b/workloads/ecommerce/src/components/navigation/CategoryMenu.tsx deleted file mode 100644 index 7da0d07..0000000 --- a/workloads/ecommerce/src/components/navigation/CategoryMenu.tsx +++ /dev/null @@ -1,87 +0,0 @@ -"use client"; - -import { usePathname, useSearchParams } from "next/navigation"; -import styles from "./CategoryMenu.module.css"; - -type MenuItem = { - label: string; - href: string; -}; - -/** - * Menú principal ARI Shopping. - * - * Hotfix de estabilidad: - * Se utilizan enlaces HTML nativos para que cada cambio de categoría - * realice una navegación completa. Esto evita conservar estados obsoletos - * del catálogo cuando únicamente cambia el query string. - */ -const MENU_ITEMS: readonly MenuItem[] = [ - { - label: "Juguetes para bebés", - href: "/catalog?category=Figuras", - }, - { - label: "Educativos", - href: "/catalog?category=Figuras§ion=educativos", - }, - { - label: "Muñecas y peluches", - href: "/catalog?category=Peluches", - }, - { - label: "Acción y aventura", - href: "/catalog?collection=Marvel", - }, - { - label: "Mochilas", - href: "/catalog?category=Mochilas", - }, - { - label: "Variedades", - href: "/catalog", - }, -]; - -function normalizeUrl(pathname: string, query: string): string { - return query ? `${pathname}?${query}` : pathname; -} - -export default function CategoryMenu() { - const pathname = usePathname(); - const searchParams = useSearchParams(); - const currentUrl = normalizeUrl(pathname, searchParams.toString()); - - return ( - - ); -} \ No newline at end of file