feat: added competition preview page model

This commit is contained in:
rngsurrounded
2025-03-01 15:03:58 +09:00
parent a232b287aa
commit 692e9b5be8
19 changed files with 150 additions and 229 deletions
@@ -1,33 +0,0 @@
# Details
Date : 2025-03-01 14:18:38
Directory c:\\Users\\Admin\\Documents\\VS Code Projects\\project\\services\\frontend\\src
Total : 18 files, 736 codes, 5 comments, 85 blanks, all 826 lines
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
## Files
| filename | language | code | comment | blank | total |
| :--- | :--- | ---: | ---: | ---: | ---: |
| [src/App.tsx](/src/App.tsx) | TypeScript JSX | 11 | 0 | 3 | 14 |
| [src/components/ui/alert.tsx](/src/components/ui/alert.tsx) | TypeScript JSX | 60 | 0 | 7 | 67 |
| [src/components/ui/badge.tsx](/src/components/ui/badge.tsx) | TypeScript JSX | 41 | 0 | 6 | 47 |
| [src/components/ui/button.tsx](/src/components/ui/button.tsx) | TypeScript JSX | 53 | 0 | 6 | 59 |
| [src/components/ui/card.tsx](/src/components/ui/card.tsx) | TypeScript JSX | 60 | 0 | 9 | 69 |
| [src/components/ui/skeleton.tsx](/src/components/ui/skeleton.tsx) | TypeScript JSX | 11 | 0 | 3 | 14 |
| [src/components/ui/tabs.tsx](/src/components/ui/tabs.tsx) | TypeScript JSX | 64 | 0 | 6 | 70 |
| [src/main.tsx](/src/main.tsx) | TypeScript JSX | 11 | 0 | 2 | 13 |
| [src/pages/CompetitionsPage/components/CompetitionCard/index.tsx](/src/pages/CompetitionsPage/components/CompetitionCard/index.tsx) | TypeScript JSX | 41 | 0 | 5 | 46 |
| [src/pages/CompetitionsPage/components/CompetitionSkeleton/index.tsx](/src/pages/CompetitionsPage/components/CompetitionSkeleton/index.tsx) | TypeScript JSX | 18 | 0 | 2 | 20 |
| [src/pages/CompetitionsPage/components/CompetitionTag/index.tsx](/src/pages/CompetitionsPage/components/CompetitionTag/index.tsx) | TypeScript JSX | 23 | 0 | 3 | 26 |
| [src/pages/CompetitionsPage/index.tsx](/src/pages/CompetitionsPage/index.tsx) | TypeScript JSX | 145 | 4 | 15 | 164 |
| [src/pages/CompetitionsPage/modules/CompetitionGrid/index.tsx](/src/pages/CompetitionsPage/modules/CompetitionGrid/index.tsx) | TypeScript JSX | 41 | 0 | 5 | 46 |
| [src/pages/CompetitionsPage/types.ts](/src/pages/CompetitionsPage/types.ts) | TypeScript | 12 | 0 | 2 | 14 |
| [src/shared/lib/utils.ts](/src/shared/lib/utils.ts) | TypeScript | 5 | 0 | 2 | 7 |
| [src/styles/fonts.css](/src/styles/fonts.css) | CSS | 18 | 0 | 2 | 20 |
| [src/styles/globals.css](/src/styles/globals.css) | CSS | 122 | 0 | 6 | 128 |
| [src/vite-env.d.ts](/src/vite-env.d.ts) | TypeScript | 0 | 1 | 1 | 2 |
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
@@ -1,15 +0,0 @@
# Diff Details
Date : 2025-03-01 14:18:38
Directory c:\\Users\\Admin\\Documents\\VS Code Projects\\project\\services\\frontend\\src
Total : 0 files, 0 codes, 0 comments, 0 blanks, all 0 lines
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
## Files
| filename | language | code | comment | blank | total |
| :--- | :--- | ---: | ---: | ---: | ---: |
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
@@ -1,2 +0,0 @@
"filename", "language", "", "comment", "blank", "total"
"Total", "-", , 0, 0, 0
1 filename language comment blank total
2 Total - 0 0 0
@@ -1,19 +0,0 @@
# Diff Summary
Date : 2025-03-01 14:18:38
Directory c:\\Users\\Admin\\Documents\\VS Code Projects\\project\\services\\frontend\\src
Total : 0 files, 0 codes, 0 comments, 0 blanks, all 0 lines
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
## Languages
| language | files | code | comment | blank | total |
| :--- | ---: | ---: | ---: | ---: | ---: |
## Directories
| path | files | code | comment | blank | total |
| :--- | ---: | ---: | ---: | ---: | ---: |
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
@@ -1,22 +0,0 @@
Date : 2025-03-01 14:18:38
Directory : c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src
Total : 0 files, 0 codes, 0 comments, 0 blanks, all 0 lines
Languages
+----------+------------+------------+------------+------------+------------+
| language | files | code | comment | blank | total |
+----------+------------+------------+------------+------------+------------+
+----------+------------+------------+------------+------------+------------+
Directories
+------+------------+------------+------------+------------+------------+
| path | files | code | comment | blank | total |
+------+------------+------------+------------+------------+------------+
+------+------------+------------+------------+------------+------------+
Files
+----------+----------+------------+------------+------------+------------+
| filename | language | code | comment | blank | total |
+----------+----------+------------+------------+------------+------------+
| Total | | 0 | 0 | 0 | 0 |
+----------+----------+------------+------------+------------+------------+
@@ -1,20 +0,0 @@
"filename", "language", "TypeScript", "TypeScript JSX", "CSS", "comment", "blank", "total"
"c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\App.tsx", "TypeScript JSX", 0, 11, 0, 0, 3, 14
"c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\components\ui\alert.tsx", "TypeScript JSX", 0, 60, 0, 0, 7, 67
"c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\components\ui\badge.tsx", "TypeScript JSX", 0, 41, 0, 0, 6, 47
"c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\components\ui\button.tsx", "TypeScript JSX", 0, 53, 0, 0, 6, 59
"c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\components\ui\card.tsx", "TypeScript JSX", 0, 60, 0, 0, 9, 69
"c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\components\ui\skeleton.tsx", "TypeScript JSX", 0, 11, 0, 0, 3, 14
"c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\components\ui\tabs.tsx", "TypeScript JSX", 0, 64, 0, 0, 6, 70
"c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\main.tsx", "TypeScript JSX", 0, 11, 0, 0, 2, 13
"c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\pages\CompetitionsPage\components\CompetitionCard\index.tsx", "TypeScript JSX", 0, 41, 0, 0, 5, 46
"c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\pages\CompetitionsPage\components\CompetitionSkeleton\index.tsx", "TypeScript JSX", 0, 18, 0, 0, 2, 20
"c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\pages\CompetitionsPage\components\CompetitionTag\index.tsx", "TypeScript JSX", 0, 23, 0, 0, 3, 26
"c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\pages\CompetitionsPage\index.tsx", "TypeScript JSX", 0, 145, 0, 4, 15, 164
"c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\pages\CompetitionsPage\modules\CompetitionGrid\index.tsx", "TypeScript JSX", 0, 41, 0, 0, 5, 46
"c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\pages\CompetitionsPage\types.ts", "TypeScript", 12, 0, 0, 0, 2, 14
"c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\shared\lib\utils.ts", "TypeScript", 5, 0, 0, 0, 2, 7
"c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\styles\fonts.css", "CSS", 0, 0, 18, 0, 2, 20
"c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\styles\globals.css", "CSS", 0, 0, 122, 0, 6, 128
"c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\vite-env.d.ts", "TypeScript", 0, 0, 0, 1, 1, 2
"Total", "-", 17, 579, 140, 5, 85, 826
1 filename language TypeScript TypeScript JSX CSS comment blank total
2 c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\App.tsx TypeScript JSX 0 11 0 0 3 14
3 c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\components\ui\alert.tsx TypeScript JSX 0 60 0 0 7 67
4 c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\components\ui\badge.tsx TypeScript JSX 0 41 0 0 6 47
5 c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\components\ui\button.tsx TypeScript JSX 0 53 0 0 6 59
6 c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\components\ui\card.tsx TypeScript JSX 0 60 0 0 9 69
7 c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\components\ui\skeleton.tsx TypeScript JSX 0 11 0 0 3 14
8 c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\components\ui\tabs.tsx TypeScript JSX 0 64 0 0 6 70
9 c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\main.tsx TypeScript JSX 0 11 0 0 2 13
10 c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\pages\CompetitionsPage\components\CompetitionCard\index.tsx TypeScript JSX 0 41 0 0 5 46
11 c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\pages\CompetitionsPage\components\CompetitionSkeleton\index.tsx TypeScript JSX 0 18 0 0 2 20
12 c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\pages\CompetitionsPage\components\CompetitionTag\index.tsx TypeScript JSX 0 23 0 0 3 26
13 c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\pages\CompetitionsPage\index.tsx TypeScript JSX 0 145 0 4 15 164
14 c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\pages\CompetitionsPage\modules\CompetitionGrid\index.tsx TypeScript JSX 0 41 0 0 5 46
15 c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\pages\CompetitionsPage\types.ts TypeScript 12 0 0 0 2 14
16 c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\shared\lib\utils.ts TypeScript 5 0 0 0 2 7
17 c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\styles\fonts.css CSS 0 0 18 0 2 20
18 c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\styles\globals.css CSS 0 0 122 0 6 128
19 c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\vite-env.d.ts TypeScript 0 0 0 1 1 2
20 Total - 17 579 140 5 85 826
@@ -1 +0,0 @@
{"file:///c%3A/Users/Admin/Documents/VS%20Code%20Projects/project/services/frontend/src/vite-env.d.ts":{"language":"TypeScript","code":0,"comment":1,"blank":1},"file:///c%3A/Users/Admin/Documents/VS%20Code%20Projects/project/services/frontend/src/main.tsx":{"language":"TypeScript JSX","code":11,"comment":0,"blank":2},"file:///c%3A/Users/Admin/Documents/VS%20Code%20Projects/project/services/frontend/src/styles/fonts.css":{"language":"CSS","code":18,"comment":0,"blank":2},"file:///c%3A/Users/Admin/Documents/VS%20Code%20Projects/project/services/frontend/src/shared/lib/utils.ts":{"language":"TypeScript","code":5,"comment":0,"blank":2},"file:///c%3A/Users/Admin/Documents/VS%20Code%20Projects/project/services/frontend/src/styles/globals.css":{"language":"CSS","code":122,"comment":0,"blank":6},"file:///c%3A/Users/Admin/Documents/VS%20Code%20Projects/project/services/frontend/src/pages/CompetitionsPage/types.ts":{"language":"TypeScript","code":12,"comment":0,"blank":2},"file:///c%3A/Users/Admin/Documents/VS%20Code%20Projects/project/services/frontend/src/pages/CompetitionsPage/components/CompetitionTag/index.tsx":{"language":"TypeScript JSX","code":23,"comment":0,"blank":3},"file:///c%3A/Users/Admin/Documents/VS%20Code%20Projects/project/services/frontend/src/components/ui/tabs.tsx":{"language":"TypeScript JSX","code":64,"comment":0,"blank":6},"file:///c%3A/Users/Admin/Documents/VS%20Code%20Projects/project/services/frontend/src/components/ui/skeleton.tsx":{"language":"TypeScript JSX","code":11,"comment":0,"blank":3},"file:///c%3A/Users/Admin/Documents/VS%20Code%20Projects/project/services/frontend/src/pages/CompetitionsPage/modules/CompetitionGrid/index.tsx":{"language":"TypeScript JSX","code":41,"comment":0,"blank":5},"file:///c%3A/Users/Admin/Documents/VS%20Code%20Projects/project/services/frontend/src/components/ui/card.tsx":{"language":"TypeScript JSX","code":60,"comment":0,"blank":9},"file:///c%3A/Users/Admin/Documents/VS%20Code%20Projects/project/services/frontend/src/components/ui/badge.tsx":{"language":"TypeScript JSX","code":41,"comment":0,"blank":6},"file:///c%3A/Users/Admin/Documents/VS%20Code%20Projects/project/services/frontend/src/components/ui/button.tsx":{"language":"TypeScript JSX","code":53,"comment":0,"blank":6},"file:///c%3A/Users/Admin/Documents/VS%20Code%20Projects/project/services/frontend/src/components/ui/alert.tsx":{"language":"TypeScript JSX","code":60,"comment":0,"blank":7},"file:///c%3A/Users/Admin/Documents/VS%20Code%20Projects/project/services/frontend/src/pages/CompetitionsPage/components/CompetitionSkeleton/index.tsx":{"language":"TypeScript JSX","code":18,"comment":0,"blank":2},"file:///c%3A/Users/Admin/Documents/VS%20Code%20Projects/project/services/frontend/src/App.tsx":{"language":"TypeScript JSX","code":11,"comment":0,"blank":3},"file:///c%3A/Users/Admin/Documents/VS%20Code%20Projects/project/services/frontend/src/pages/CompetitionsPage/components/CompetitionCard/index.tsx":{"language":"TypeScript JSX","code":41,"comment":0,"blank":5},"file:///c%3A/Users/Admin/Documents/VS%20Code%20Projects/project/services/frontend/src/pages/CompetitionsPage/index.tsx":{"language":"TypeScript JSX","code":145,"comment":4,"blank":15}}
@@ -1,38 +0,0 @@
# Summary
Date : 2025-03-01 14:18:38
Directory c:\\Users\\Admin\\Documents\\VS Code Projects\\project\\services\\frontend\\src
Total : 18 files, 736 codes, 5 comments, 85 blanks, all 826 lines
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
## Languages
| language | files | code | comment | blank | total |
| :--- | ---: | ---: | ---: | ---: | ---: |
| TypeScript JSX | 13 | 579 | 4 | 72 | 655 |
| CSS | 2 | 140 | 0 | 8 | 148 |
| TypeScript | 3 | 17 | 1 | 5 | 23 |
## Directories
| path | files | code | comment | blank | total |
| :--- | ---: | ---: | ---: | ---: | ---: |
| . | 18 | 736 | 5 | 85 | 826 |
| . (Files) | 3 | 22 | 1 | 6 | 29 |
| components | 6 | 289 | 0 | 37 | 326 |
| components\\ui | 6 | 289 | 0 | 37 | 326 |
| pages | 6 | 280 | 4 | 32 | 316 |
| pages\\CompetitionsPage | 6 | 280 | 4 | 32 | 316 |
| pages\\CompetitionsPage (Files) | 2 | 157 | 4 | 17 | 178 |
| pages\\CompetitionsPage\\components | 3 | 82 | 0 | 10 | 92 |
| pages\\CompetitionsPage\\components\\CompetitionCard | 1 | 41 | 0 | 5 | 46 |
| pages\\CompetitionsPage\\components\\CompetitionSkeleton | 1 | 18 | 0 | 2 | 20 |
| pages\\CompetitionsPage\\components\\CompetitionTag | 1 | 23 | 0 | 3 | 26 |
| pages\\CompetitionsPage\\modules | 1 | 41 | 0 | 5 | 46 |
| pages\\CompetitionsPage\\modules\\CompetitionGrid | 1 | 41 | 0 | 5 | 46 |
| shared | 1 | 5 | 0 | 2 | 7 |
| shared\\lib | 1 | 5 | 0 | 2 | 7 |
| styles | 2 | 140 | 0 | 8 | 148 |
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
@@ -1,59 +0,0 @@
Date : 2025-03-01 14:18:38
Directory : c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src
Total : 18 files, 736 codes, 5 comments, 85 blanks, all 826 lines
Languages
+----------------+------------+------------+------------+------------+------------+
| language | files | code | comment | blank | total |
+----------------+------------+------------+------------+------------+------------+
| TypeScript JSX | 13 | 579 | 4 | 72 | 655 |
| CSS | 2 | 140 | 0 | 8 | 148 |
| TypeScript | 3 | 17 | 1 | 5 | 23 |
+----------------+------------+------------+------------+------------+------------+
Directories
+-----------------------------------------------------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
| path | files | code | comment | blank | total |
+-----------------------------------------------------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
| . | 18 | 736 | 5 | 85 | 826 |
| . (Files) | 3 | 22 | 1 | 6 | 29 |
| components | 6 | 289 | 0 | 37 | 326 |
| components\ui | 6 | 289 | 0 | 37 | 326 |
| pages | 6 | 280 | 4 | 32 | 316 |
| pages\CompetitionsPage | 6 | 280 | 4 | 32 | 316 |
| pages\CompetitionsPage (Files) | 2 | 157 | 4 | 17 | 178 |
| pages\CompetitionsPage\components | 3 | 82 | 0 | 10 | 92 |
| pages\CompetitionsPage\components\CompetitionCard | 1 | 41 | 0 | 5 | 46 |
| pages\CompetitionsPage\components\CompetitionSkeleton | 1 | 18 | 0 | 2 | 20 |
| pages\CompetitionsPage\components\CompetitionTag | 1 | 23 | 0 | 3 | 26 |
| pages\CompetitionsPage\modules | 1 | 41 | 0 | 5 | 46 |
| pages\CompetitionsPage\modules\CompetitionGrid | 1 | 41 | 0 | 5 | 46 |
| shared | 1 | 5 | 0 | 2 | 7 |
| shared\lib | 1 | 5 | 0 | 2 | 7 |
| styles | 2 | 140 | 0 | 8 | 148 |
+-----------------------------------------------------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
Files
+-----------------------------------------------------------------------------------------------------------------------------------------+----------------+------------+------------+------------+------------+
| filename | language | code | comment | blank | total |
+-----------------------------------------------------------------------------------------------------------------------------------------+----------------+------------+------------+------------+------------+
| c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\App.tsx | TypeScript JSX | 11 | 0 | 3 | 14 |
| c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\components\ui\alert.tsx | TypeScript JSX | 60 | 0 | 7 | 67 |
| c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\components\ui\badge.tsx | TypeScript JSX | 41 | 0 | 6 | 47 |
| c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\components\ui\button.tsx | TypeScript JSX | 53 | 0 | 6 | 59 |
| c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\components\ui\card.tsx | TypeScript JSX | 60 | 0 | 9 | 69 |
| c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\components\ui\skeleton.tsx | TypeScript JSX | 11 | 0 | 3 | 14 |
| c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\components\ui\tabs.tsx | TypeScript JSX | 64 | 0 | 6 | 70 |
| c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\main.tsx | TypeScript JSX | 11 | 0 | 2 | 13 |
| c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\pages\CompetitionsPage\components\CompetitionCard\index.tsx | TypeScript JSX | 41 | 0 | 5 | 46 |
| c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\pages\CompetitionsPage\components\CompetitionSkeleton\index.tsx | TypeScript JSX | 18 | 0 | 2 | 20 |
| c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\pages\CompetitionsPage\components\CompetitionTag\index.tsx | TypeScript JSX | 23 | 0 | 3 | 26 |
| c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\pages\CompetitionsPage\index.tsx | TypeScript JSX | 145 | 4 | 15 | 164 |
| c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\pages\CompetitionsPage\modules\CompetitionGrid\index.tsx | TypeScript JSX | 41 | 0 | 5 | 46 |
| c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\pages\CompetitionsPage\types.ts | TypeScript | 12 | 0 | 2 | 14 |
| c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\shared\lib\utils.ts | TypeScript | 5 | 0 | 2 | 7 |
| c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\styles\fonts.css | CSS | 18 | 0 | 2 | 20 |
| c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\styles\globals.css | CSS | 122 | 0 | 6 | 128 |
| c:\Users\Admin\Documents\VS Code Projects\project\services\frontend\src\vite-env.d.ts | TypeScript | 0 | 1 | 1 | 2 |
| Total | | 736 | 5 | 85 | 826 |
+-----------------------------------------------------------------------------------------------------------------------------------------+----------------+------------+------------+------------+------------+
+1 -1
View File
@@ -11,7 +11,7 @@ node_modules
dist
dist-ssr
*.local
.VSCodeCounter
# Editor directories and files
.vscode/*
!.vscode/extensions.json
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 246 KiB

+2
View File
@@ -1,11 +1,13 @@
import { Routes, Route } from "react-router";
import "./styles/globals.css";
import CompetitionsPage from "./pages/CompetitionsPage";
import CompetitionPreview from "./pages/CompetitionPreview";
const App = () => {
return (
<Routes>
<Route path="/" element={<CompetitionsPage/>} />
<Route path="/competition/:id" element={<CompetitionPreview />} />
</Routes>
);
@@ -0,0 +1,115 @@
import { useEffect, useState } from "react";
import { useParams, useNavigate } from "react-router-dom";
import Navbar from "@/modules/Navbar";
import { Button } from "@/components/ui/button";
import { ArrowLeft } from "lucide-react";
import { Competition, Status } from "@/shared/types/types";
const mockCompetitions: Competition[] = [
{
id: '1',
name: 'Олимпиада DANO 2025. Индивидуальный этап',
imageUrl: '/DANO.png',
isOlympics: true,
status: Status.InProgress,
description: 'Проверка глубоких знаний и навыков в анализе данных.
Будет несколько творческих заданий со свободным ответом
Задания выполняются индивидуально, вес тура в итоговом результате – 0,5
Этап пройдет онлайн в заданное время, с применением системы прокторинга
На работу дается 240 минут'
},
{
id: '2',
name: 'Олимпиада DANO 2025. Индивидуальный этап',
imageUrl: '/DANO.png',
isOlympics: false,
status: Status.NotParticipating,
description: 'Индивидуальный этап олимпиады DANO 2025 – это уникальная возможность для студентов продемонстрировать свои навыки анализа данных и решения сложных задач. Участники будут работать с реальными наборами данных и применять современные методы машинного обучения и статистического анализа.'
},
];
const CompetitionPreview = () => {
const { id } = useParams<{ id: string }>();
const navigate = useNavigate();
const [competition, setCompetition] = useState<Competition | null>(null);
const [isLoading, setIsLoading] = useState(true);
useEffect(() => {
const fetchCompetition = async () => {
try {
setTimeout(() => {
const found = mockCompetitions.find(comp => comp.id === id);
setCompetition(found || null);
setIsLoading(false);
}, 500);
} catch (error) {
console.error("Error fetching competition:", error);
setIsLoading(false);
}
};
fetchCompetition();
}, [id]);
const handleBack = () => {
navigate(-1);
};
const handleContinue = () => {
console.log("Continue to competition:", competition?.id);
};
return (
<>
<Navbar />
<div className="container mx-auto px-4 py-8 mt-16">
<button
onClick={handleBack}
className="flex items-center text-gray-600 mb-8 font-hse-sans"
>
<ArrowLeft size={16} className="mr-2" />
Назад к соревнованиям
</button>
{isLoading ? (
<div className="flex justify-center items-center h-64">
<p className="font-hse-sans text-gray-500">Загрузка...</p>
</div>
) : competition ? (
<div className="max-w-5xl mx-auto bg-white rounded-lg overflow-hidden shadow-lg">
<div className="w-full h-80 overflow-hidden">
<img
src={competition.imageUrl}
alt={competition.name}
className="w-full h-full object-cover"
/>
</div>
<div className="p-8">
<div className="flex justify-between items-center mb-8">
<h1 className="text-3xl font-semibold font-hse-sans mr-6 flex-1">{competition.name}</h1>
<Button
className="bg-yellow-400 hover:bg-yellow-500 text-black font-hse-sans text-base px-12 min-w-[180px]"
onClick={handleContinue}
>
Продолжить
</Button>
</div>
<div className="text-gray-700 font-hse-sans text-lg leading-relaxed">
<p>{competition.description}</p>
</div>
</div>
</div>
) : (
<div className="text-center py-12">
<h2 className="text-2xl font-bold mb-2 font-hse-sans">Соревнование не найдено</h2>
<p className="text-gray-600 font-hse-sans">Запрошенное соревнование не существует или было удалено.</p>
</div>
)}
</div>
</>
);
};
export default CompetitionPreview;
@@ -1,10 +1,11 @@
import { Competition } from "../../types";
import { Competition } from "@/shared/types/types";
import { cn } from "@/shared/lib/utils";
import {
Card,
CardContent,
CardFooter,
} from "@/components/ui/card";
import { useNavigate } from "react-router";
interface CompetitionCardProps {
competition: Competition;
@@ -12,10 +13,18 @@ interface CompetitionCardProps {
}
export function CompetitionCard({ competition, className }: CompetitionCardProps) {
const { name, imageUrl, isOlympics, status } = competition;
const { id, name, imageUrl, isOlympics, status } = competition;
const navigate = useNavigate();
const handleClick = () => {
navigate(`/competition/${id}`);
};
return (
<Card className={cn("overflow-hidden h-full", className)}>
<Card
className={cn("overflow-hidden h-full", className)}
onClick={handleClick}
>
<div className="relative h-48 overflow-hidden">
<img
src={imageUrl}
@@ -1,10 +1,10 @@
import { useState, useEffect } from 'react';
import { Competition, Status } from './types';
import { Competition, Status } from '@/shared/types/types';
import { CompetitionGrid } from './modules/CompetitionGrid';
import { Alert, AlertDescription } from "@/components/ui/alert";
import { AlertCircle } from "lucide-react";
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
import Navbar from './modules/Navbar';
import Navbar from '@/modules/Navbar';
const mockCompetitions: Competition[] = [
{
@@ -1,4 +1,4 @@
import { Competition } from "../../types";
import { Competition } from "@/shared/types/types";
import { CompetitionCard } from "../../components/CompetitionCard";
import CompetitionSkeleton from "../../components/CompetitionSkeleton";
import { cn } from "@/shared/lib/utils";
@@ -1,13 +0,0 @@
export enum Status {
InProgress = 'В процессе',
NotParticipating = 'Не участвую',
Completed = 'Завершено'
}
export interface Competition {
id: string;
name: string;
imageUrl: string;
isOlympics: boolean;
status: Status;
}
@@ -0,0 +1,17 @@
enum Status {
InProgress = 'В процессе',
NotParticipating = 'Не участвую',
Completed = 'Завершено'
}
interface Competition {
id: string;
name: string;
imageUrl: string;
isOlympics: boolean;
status: Status;
description?: string;
}
export {Status}
export type {Competition}