POL-124: Migrate frontend from React Native to Next.js web app

- Replace mobile/ (Expo) with web/ (Next.js 16 + Tailwind + shadcn/ui)
- Pages: login, register, pending, championships, championship detail, registrations, profile, admin
- Logic/view separated: hooks/ for data, components/ for UI, pages compose both
- Types in src/types/ (one interface per file)
- Auth: Zustand store + localStorage tokens + cookie presence flag for proxy
- API layer: axios client with JWT auto-refresh

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Dianaka123
2026-02-26 20:35:22 +03:00
parent 390c338b32
commit 9fcd7c1d63
94 changed files with 13713 additions and 10785 deletions

15
web/src/lib/api/users.ts Normal file
View File

@@ -0,0 +1,15 @@
import { apiClient } from "./client";
import { UserOut } from "@/types/user";
export type { UserOut };
export const usersApi = {
list: () =>
apiClient.get<UserOut[]>("/users").then((r) => r.data),
approve: (id: string) =>
apiClient.patch<UserOut>(`/users/${id}/approve`).then((r) => r.data),
reject: (id: string) =>
apiClient.patch<UserOut>(`/users/${id}/reject`).then((r) => r.data),
};