From c948179b5b2b5d71723768d5835acb4c45e39c44 Mon Sep 17 00:00:00 2001 From: Dianaka123 Date: Thu, 26 Feb 2026 20:58:35 +0300 Subject: [PATCH] Refactor: reorganize components into domain subfolders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit shared/ → StatusBadge layout/ → Navbar championships/ → ChampionshipCard registrations/ → RegistrationCard, RegistrationTimeline admin/ → UserCard Co-Authored-By: Claude Sonnet 4.6 --- web/src/app/(app)/admin/page.tsx | 2 +- web/src/app/(app)/championships/[id]/page.tsx | 4 ++-- web/src/app/(app)/championships/page.tsx | 2 +- web/src/app/(app)/layout.tsx | 2 +- web/src/app/(app)/registrations/page.tsx | 2 +- web/src/components/{ => admin}/UserCard.tsx | 0 web/src/components/{ => championships}/ChampionshipCard.tsx | 2 +- web/src/components/{ => layout}/Navbar.tsx | 0 web/src/components/{ => registrations}/RegistrationCard.tsx | 2 +- .../components/{ => registrations}/RegistrationTimeline.tsx | 0 web/src/components/{ => shared}/StatusBadge.tsx | 0 11 files changed, 8 insertions(+), 8 deletions(-) rename web/src/components/{ => admin}/UserCard.tsx (100%) rename web/src/components/{ => championships}/ChampionshipCard.tsx (95%) rename web/src/components/{ => layout}/Navbar.tsx (100%) rename web/src/components/{ => registrations}/RegistrationCard.tsx (96%) rename web/src/components/{ => registrations}/RegistrationTimeline.tsx (100%) rename web/src/components/{ => shared}/StatusBadge.tsx (100%) diff --git a/web/src/app/(app)/admin/page.tsx b/web/src/app/(app)/admin/page.tsx index 45f0f41..408f868 100644 --- a/web/src/app/(app)/admin/page.tsx +++ b/web/src/app/(app)/admin/page.tsx @@ -3,7 +3,7 @@ import { useState } from "react"; import { useUsers, useUserActions } from "@/hooks/useUsers"; import { useAuth } from "@/hooks/useAuth"; -import { UserCard } from "@/components/UserCard"; +import { UserCard } from "@/components/admin/UserCard"; import { useRouter } from "next/navigation"; import { useEffect } from "react"; diff --git a/web/src/app/(app)/championships/[id]/page.tsx b/web/src/app/(app)/championships/[id]/page.tsx index e6c6ad5..557eab2 100644 --- a/web/src/app/(app)/championships/[id]/page.tsx +++ b/web/src/app/(app)/championships/[id]/page.tsx @@ -5,8 +5,8 @@ import { useChampionship } from "@/hooks/useChampionships"; import { useMyRegistrations } from "@/hooks/useRegistrations"; import { useRegisterForChampionship } from "@/hooks/useRegistrations"; import { useAuth } from "@/hooks/useAuth"; -import { RegistrationTimeline } from "@/components/RegistrationTimeline"; -import { StatusBadge } from "@/components/StatusBadge"; +import { RegistrationTimeline } from "@/components/registrations/RegistrationTimeline"; +import { StatusBadge } from "@/components/shared/StatusBadge"; import { Button } from "@/components/ui/button"; import { Separator } from "@/components/ui/separator"; diff --git a/web/src/app/(app)/championships/page.tsx b/web/src/app/(app)/championships/page.tsx index d04d467..b325bcf 100644 --- a/web/src/app/(app)/championships/page.tsx +++ b/web/src/app/(app)/championships/page.tsx @@ -1,7 +1,7 @@ "use client"; import { useChampionships } from "@/hooks/useChampionships"; -import { ChampionshipCard } from "@/components/ChampionshipCard"; +import { ChampionshipCard } from "@/components/championships/ChampionshipCard"; export default function ChampionshipsPage() { const { data, isLoading, error } = useChampionships(); diff --git a/web/src/app/(app)/layout.tsx b/web/src/app/(app)/layout.tsx index 54041bb..6a727ed 100644 --- a/web/src/app/(app)/layout.tsx +++ b/web/src/app/(app)/layout.tsx @@ -1,4 +1,4 @@ -import { Navbar } from "@/components/Navbar"; +import { Navbar } from "@/components/layout/Navbar"; export default function AppLayout({ children }: { children: React.ReactNode }) { return ( diff --git a/web/src/app/(app)/registrations/page.tsx b/web/src/app/(app)/registrations/page.tsx index c68ecaf..6f25d7b 100644 --- a/web/src/app/(app)/registrations/page.tsx +++ b/web/src/app/(app)/registrations/page.tsx @@ -1,7 +1,7 @@ "use client"; import { useMyRegistrations } from "@/hooks/useRegistrations"; -import { RegistrationCard } from "@/components/RegistrationCard"; +import { RegistrationCard } from "@/components/registrations/RegistrationCard"; export default function RegistrationsPage() { const { data, isLoading, error } = useMyRegistrations(); diff --git a/web/src/components/UserCard.tsx b/web/src/components/admin/UserCard.tsx similarity index 100% rename from web/src/components/UserCard.tsx rename to web/src/components/admin/UserCard.tsx diff --git a/web/src/components/ChampionshipCard.tsx b/web/src/components/championships/ChampionshipCard.tsx similarity index 95% rename from web/src/components/ChampionshipCard.tsx rename to web/src/components/championships/ChampionshipCard.tsx index 9474404..44779a6 100644 --- a/web/src/components/ChampionshipCard.tsx +++ b/web/src/components/championships/ChampionshipCard.tsx @@ -1,6 +1,6 @@ import Link from "next/link"; import { Championship } from "@/types/championship"; -import { StatusBadge } from "@/components/StatusBadge"; +import { StatusBadge } from "@/components/shared/StatusBadge"; import { Card, CardContent } from "@/components/ui/card"; interface Props { diff --git a/web/src/components/Navbar.tsx b/web/src/components/layout/Navbar.tsx similarity index 100% rename from web/src/components/Navbar.tsx rename to web/src/components/layout/Navbar.tsx diff --git a/web/src/components/RegistrationCard.tsx b/web/src/components/registrations/RegistrationCard.tsx similarity index 96% rename from web/src/components/RegistrationCard.tsx rename to web/src/components/registrations/RegistrationCard.tsx index 75e1d41..7f066f7 100644 --- a/web/src/components/RegistrationCard.tsx +++ b/web/src/components/registrations/RegistrationCard.tsx @@ -1,6 +1,6 @@ import Link from "next/link"; import { Registration } from "@/types/registration"; -import { StatusBadge } from "@/components/StatusBadge"; +import { StatusBadge } from "@/components/shared/StatusBadge"; import { Card, CardContent } from "@/components/ui/card"; const STEPS = ["submitted", "form_submitted", "payment_pending", "payment_confirmed", "video_submitted", "accepted"]; diff --git a/web/src/components/RegistrationTimeline.tsx b/web/src/components/registrations/RegistrationTimeline.tsx similarity index 100% rename from web/src/components/RegistrationTimeline.tsx rename to web/src/components/registrations/RegistrationTimeline.tsx diff --git a/web/src/components/StatusBadge.tsx b/web/src/components/shared/StatusBadge.tsx similarity index 100% rename from web/src/components/StatusBadge.tsx rename to web/src/components/shared/StatusBadge.tsx