diff options
Diffstat (limited to 'frontend/src')
43 files changed, 132 insertions, 134 deletions
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index c6952b1..e4bde75 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx | |||
| @@ -1,22 +1,22 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { Routes, Route } from "react-router-dom"; | 2 | import { Routes, Route } from "react-router-dom"; |
| 3 | 3 | ||
| 4 | import { UserProfile } from './types/Profile'; | 4 | import { UserProfile } from '@customTypes/Profile'; |
| 5 | import Sidebar from './components/Sidebar'; | 5 | import Sidebar from './components/Sidebar'; |
| 6 | import "./App.css"; | 6 | import "./App.css"; |
| 7 | 7 | ||
| 8 | import Profile from './pages/Profile'; | 8 | import Profile from '@pages/Profile'; |
| 9 | import Games from './pages/Games'; | 9 | import Games from '@pages/Games'; |
| 10 | import Maps from './pages/Maps'; | 10 | import Maps from '@pages/Maps'; |
| 11 | import User from './pages/User'; | 11 | import User from '@pages/User'; |
| 12 | import Homepage from './pages/Homepage'; | 12 | import Homepage from '@pages/Homepage'; |
| 13 | import UploadRunDialog from './components/UploadRunDialog'; | 13 | import UploadRunDialog from './components/UploadRunDialog'; |
| 14 | import Rules from './pages/Rules'; | 14 | import Rules from '@pages/Rules'; |
| 15 | import About from './pages/About'; | 15 | import About from '@pages/About'; |
| 16 | import { Game } from './types/Game'; | 16 | import { Game } from '@customTypes/Game'; |
| 17 | import { API } from './api/Api'; | 17 | import { API } from './api/Api'; |
| 18 | import Maplist from './pages/Maplist'; | 18 | import Maplist from '@pages/Maplist'; |
| 19 | import Rankings from './pages/Rankings'; | 19 | import Rankings from '@pages/Rankings'; |
| 20 | import { get_user_id_from_token, get_user_mod_from_token } from './utils/Jwt'; | 20 | import { get_user_id_from_token, get_user_mod_from_token } from './utils/Jwt'; |
| 21 | 21 | ||
| 22 | const App: React.FC = () => { | 22 | const App: React.FC = () => { |
diff --git a/frontend/src/api/Api.tsx b/frontend/src/api/Api.ts index 053e920..2e55ab4 100644 --- a/frontend/src/api/Api.tsx +++ b/frontend/src/api/Api.ts | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | import { MapDiscussionCommentContent, MapDiscussionContent, ModMenuContent } from '../types/Content'; | 1 | import { MapDiscussionCommentContent, MapDiscussionContent, ModMenuContent } from '@customTypes/Content'; |
| 2 | import { delete_token, get_token } from './Auth'; | 2 | import { delete_token, get_token } from '@api/Auth'; |
| 3 | import { get_user, get_profile, post_profile } from './User'; | 3 | import { get_user, get_profile, post_profile } from '@api/User'; |
| 4 | import { get_games, get_chapters, get_games_chapters, get_game_maps, get_search } from './Games'; | 4 | import { get_games, get_chapters, get_games_chapters, get_game_maps, get_search } from '@api/Games'; |
| 5 | import { get_official_rankings, get_unofficial_rankings } from './Rankings'; | 5 | import { get_official_rankings, get_unofficial_rankings } from '@api/Rankings'; |
| 6 | import { get_map_summary, get_map_leaderboard, get_map_discussions, get_map_discussion, post_map_discussion, post_map_discussion_comment, delete_map_discussion, post_record, delete_map_record } from './Maps'; | 6 | import { get_map_summary, get_map_leaderboard, get_map_discussions, get_map_discussion, post_map_discussion, post_map_discussion_comment, delete_map_discussion, post_record, delete_map_record } from '@api/Maps'; |
| 7 | import { delete_map_summary, post_map_summary, put_map_image, put_map_summary } from './Mod'; | 7 | import { delete_map_summary, post_map_summary, put_map_image, put_map_summary } from '@api/Mod'; |
| 8 | import { UploadRunContent } from '../types/Content'; | 8 | import { UploadRunContent } from '@customTypes/Content'; |
| 9 | 9 | ||
| 10 | // add new api call function entries here | 10 | // add new api call function entries here |
| 11 | // example usage: API.get_games(); | 11 | // example usage: API.get_games(); |
diff --git a/frontend/src/api/Auth.tsx b/frontend/src/api/Auth.ts index 09269e6..875c7e5 100644 --- a/frontend/src/api/Auth.tsx +++ b/frontend/src/api/Auth.ts | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | import axios from "axios"; | 1 | import axios from "axios"; |
| 2 | import { url } from "./Api"; | 2 | import { url } from "@api/Api"; |
| 3 | 3 | ||
| 4 | export const get_token = async (): Promise<string | undefined> => { | 4 | export const get_token = async (): Promise<string | undefined> => { |
| 5 | const response = await axios.get(url(`token`)) | 5 | const response = await axios.get(url(`token`)) |
diff --git a/frontend/src/api/Games.tsx b/frontend/src/api/Games.ts index 84b5f74..72bb4b3 100644 --- a/frontend/src/api/Games.tsx +++ b/frontend/src/api/Games.ts | |||
| @@ -1,9 +1,9 @@ | |||
| 1 | import axios from "axios"; | 1 | import axios from "axios"; |
| 2 | import { url } from "./Api"; | 2 | import { url } from "@api/Api"; |
| 3 | import { GameChapter, GamesChapters } from "../types/Chapters"; | 3 | import { GameChapter, GamesChapters } from "@customTypes/Chapters"; |
| 4 | import { Game } from "../types/Game"; | 4 | import { Game } from "@customTypes/Game"; |
| 5 | import { Map } from "../types/Map"; | 5 | import { Map } from "@customTypes/Map"; |
| 6 | import { Search } from "../types/Search"; | 6 | import { Search } from "@customTypes/Search"; |
| 7 | 7 | ||
| 8 | export const get_games = async (): Promise<Game[]> => { | 8 | export const get_games = async (): Promise<Game[]> => { |
| 9 | const response = await axios.get(url(`games`)) | 9 | const response = await axios.get(url(`games`)) |
diff --git a/frontend/src/api/Maps.tsx b/frontend/src/api/Maps.ts index fc50293..89657b5 100644 --- a/frontend/src/api/Maps.tsx +++ b/frontend/src/api/Maps.ts | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | import axios from "axios"; | 1 | import axios from "axios"; |
| 2 | import { url } from "./Api"; | 2 | import { url } from "@api/Api"; |
| 3 | import { MapDiscussionContent, UploadRunContent } from "../types/Content"; | 3 | import { MapDiscussionContent, UploadRunContent } from "@customTypes/Content"; |
| 4 | import { MapSummary, MapLeaderboard, MapDiscussions, MapDiscussion } from "../types/Map"; | 4 | import { MapSummary, MapLeaderboard, MapDiscussions, MapDiscussion } from "@customTypes/Map"; |
| 5 | 5 | ||
| 6 | export const get_map_summary = async (map_id: string): Promise<MapSummary> => { | 6 | export const get_map_summary = async (map_id: string): Promise<MapSummary> => { |
| 7 | const response = await axios.get(url(`maps/${map_id}/summary`)) | 7 | const response = await axios.get(url(`maps/${map_id}/summary`)) |
diff --git a/frontend/src/api/Mod.tsx b/frontend/src/api/Mod.ts index 9091379..1511f8b 100644 --- a/frontend/src/api/Mod.tsx +++ b/frontend/src/api/Mod.ts | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | import axios from "axios"; | 1 | import axios from "axios"; |
| 2 | import { url } from "./Api"; | 2 | import { url } from "@api/Api"; |
| 3 | import { ModMenuContent } from "../types/Content"; | 3 | import { ModMenuContent } from "@customTypes/Content"; |
| 4 | 4 | ||
| 5 | export const put_map_image = async (token: string, map_id: string, image: string): Promise<boolean> => { | 5 | export const put_map_image = async (token: string, map_id: string, image: string): Promise<boolean> => { |
| 6 | const response = await axios.put(url(`maps/${map_id}/image`), { | 6 | const response = await axios.put(url(`maps/${map_id}/image`), { |
diff --git a/frontend/src/api/Rankings.tsx b/frontend/src/api/Rankings.ts index 384f826..b8d9bec 100644 --- a/frontend/src/api/Rankings.tsx +++ b/frontend/src/api/Rankings.ts | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | import axios from "axios"; | 1 | import axios from "axios"; |
| 2 | import { url } from "./Api"; | 2 | import { url } from "@api/Api"; |
| 3 | import { Ranking, SteamRanking } from "../types/Ranking"; | 3 | import { Ranking, SteamRanking } from "@customTypes/Ranking"; |
| 4 | 4 | ||
| 5 | export const get_official_rankings = async (): Promise<Ranking> => { | 5 | export const get_official_rankings = async (): Promise<Ranking> => { |
| 6 | const response = await axios.get(url(`rankings/lphub`)); | 6 | const response = await axios.get(url(`rankings/lphub`)); |
diff --git a/frontend/src/api/User.tsx b/frontend/src/api/User.ts index c4d1944..88da0f2 100644 --- a/frontend/src/api/User.tsx +++ b/frontend/src/api/User.ts | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | import axios from "axios"; | 1 | import axios from "axios"; |
| 2 | import { url } from "./Api"; | 2 | import { url } from "@api/Api"; |
| 3 | import { UserProfile } from "../types/Profile"; | 3 | import { UserProfile } from "@customTypes/Profile"; |
| 4 | 4 | ||
| 5 | export const get_user = async (user_id: string): Promise<UserProfile> => { | 5 | export const get_user = async (user_id: string): Promise<UserProfile> => { |
| 6 | const response = await axios.get(url(`users/${user_id}`)); | 6 | const response = await axios.get(url(`users/${user_id}`)); |
diff --git a/frontend/src/components/ConfirmDialog.tsx b/frontend/src/components/ConfirmDialog.tsx index c4299fd..44a653b 100644 --- a/frontend/src/components/ConfirmDialog.tsx +++ b/frontend/src/components/ConfirmDialog.tsx | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | 2 | ||
| 3 | import "../css/Dialog.css" | 3 | import "@css/Dialog.css" |
| 4 | 4 | ||
| 5 | interface ConfirmDialogProps { | 5 | interface ConfirmDialogProps { |
| 6 | title: string; | 6 | title: string; |
diff --git a/frontend/src/components/Discussions.tsx b/frontend/src/components/Discussions.tsx index 0522910..17ae586 100644 --- a/frontend/src/components/Discussions.tsx +++ b/frontend/src/components/Discussions.tsx | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | 2 | ||
| 3 | import { MapDiscussion, MapDiscussions, MapDiscussionsDetail } from '../types/Map'; | 3 | import { MapDiscussion, MapDiscussions, MapDiscussionsDetail } from '@customTypes/Map'; |
| 4 | import { MapDiscussionCommentContent, MapDiscussionContent } from '../types/Content'; | 4 | import { MapDiscussionCommentContent, MapDiscussionContent } from '@customTypes/Content'; |
| 5 | import { time_ago } from '../utils/Time'; | 5 | import { time_ago } from '@utils/Time'; |
| 6 | import { API } from '../api/Api'; | 6 | import { API } from '@api/Api'; |
| 7 | import "../css/Maps.css" | 7 | import "@css/Maps.css" |
| 8 | import { Link } from 'react-router-dom'; | 8 | import { Link } from 'react-router-dom'; |
| 9 | import useConfirm from '../hooks/UseConfirm'; | 9 | import useConfirm from '@hooks/UseConfirm'; |
| 10 | 10 | ||
| 11 | interface DiscussionsProps { | 11 | interface DiscussionsProps { |
| 12 | token?: string | 12 | token?: string |
diff --git a/frontend/src/components/GameCategory.tsx b/frontend/src/components/GameCategory.tsx index 3291e09..d8879ef 100644 --- a/frontend/src/components/GameCategory.tsx +++ b/frontend/src/components/GameCategory.tsx | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { Link } from "react-router-dom"; | 2 | import { Link } from "react-router-dom"; |
| 3 | 3 | ||
| 4 | import { Game, GameCategoryPortals } from '../types/Game'; | 4 | import { Game, GameCategoryPortals } from '@customTypes/Game'; |
| 5 | import "../css/Games.css" | 5 | import "@css/Games.css" |
| 6 | 6 | ||
| 7 | interface GameCategoryProps { | 7 | interface GameCategoryProps { |
| 8 | game: Game; | 8 | game: Game; |
diff --git a/frontend/src/components/GameEntry.tsx b/frontend/src/components/GameEntry.tsx index ced40ee..3bd2842 100644 --- a/frontend/src/components/GameEntry.tsx +++ b/frontend/src/components/GameEntry.tsx | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { Link } from "react-router-dom"; | 2 | import { Link } from "react-router-dom"; |
| 3 | 3 | ||
| 4 | import { Game, GameCategoryPortals } from '../types/Game'; | 4 | import { Game, GameCategoryPortals } from '@customTypes/Game'; |
| 5 | import "../css/Games.css" | 5 | import "@css/Games.css" |
| 6 | 6 | ||
| 7 | import GameCategory from './GameCategory'; | 7 | import GameCategory from '@components/GameCategory'; |
| 8 | 8 | ||
| 9 | interface GameEntryProps { | 9 | interface GameEntryProps { |
| 10 | game: Game; | 10 | game: Game; |
diff --git a/frontend/src/components/Leaderboards.tsx b/frontend/src/components/Leaderboards.tsx index aaaee62..4a8b463 100644 --- a/frontend/src/components/Leaderboards.tsx +++ b/frontend/src/components/Leaderboards.tsx | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { Link } from 'react-router-dom'; | 2 | import { Link } from 'react-router-dom'; |
| 3 | 3 | ||
| 4 | import { DownloadIcon, ThreedotIcon } from '../images/Images'; | 4 | import { DownloadIcon, ThreedotIcon } from '@images/Images'; |
| 5 | import { MapLeaderboard } from '../types/Map'; | 5 | import { MapLeaderboard } from '@customTypes/Map'; |
| 6 | import { ticks_to_time, time_ago } from '../utils/Time'; | 6 | import { ticks_to_time, time_ago } from '@utils/Time'; |
| 7 | import useMessage from "../hooks/UseMessage"; | 7 | import useMessage from "@hooks/UseMessage"; |
| 8 | import "../css/Maps.css" | 8 | import "@css/Maps.css" |
| 9 | 9 | ||
| 10 | interface LeaderboardsProps { | 10 | interface LeaderboardsProps { |
| 11 | data?: MapLeaderboard; | 11 | data?: MapLeaderboard; |
diff --git a/frontend/src/components/Login.tsx b/frontend/src/components/Login.tsx index 545f724..f1628b2 100644 --- a/frontend/src/components/Login.tsx +++ b/frontend/src/components/Login.tsx | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { Link, useNavigate } from 'react-router-dom'; | 2 | import { Link, useNavigate } from 'react-router-dom'; |
| 3 | 3 | ||
| 4 | import { ExitIcon, UserIcon, LoginIcon } from '../images/Images'; | 4 | import { ExitIcon, UserIcon, LoginIcon } from '@images/Images'; |
| 5 | import { UserProfile } from '../types/Profile'; | 5 | import { UserProfile } from '@customTypes/Profile'; |
| 6 | import { API } from '../api/Api'; | 6 | import { API } from '@api/Api'; |
| 7 | import "../css/Login.css"; | 7 | import "@css/Login.css"; |
| 8 | 8 | ||
| 9 | interface LoginProps { | 9 | interface LoginProps { |
| 10 | setToken: React.Dispatch<React.SetStateAction<string | undefined>>; | 10 | setToken: React.Dispatch<React.SetStateAction<string | undefined>>; |
diff --git a/frontend/src/components/MessageDialog.tsx b/frontend/src/components/MessageDialog.tsx index 17b1258..5c85189 100644 --- a/frontend/src/components/MessageDialog.tsx +++ b/frontend/src/components/MessageDialog.tsx | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | 2 | ||
| 3 | import "../css/Dialog.css" | 3 | import "@css/Dialog.css" |
| 4 | 4 | ||
| 5 | interface MessageDialogProps { | 5 | interface MessageDialogProps { |
| 6 | title: string; | 6 | title: string; |
diff --git a/frontend/src/components/MessageDialogLoad.tsx b/frontend/src/components/MessageDialogLoad.tsx index 381a4a4..966e064 100644 --- a/frontend/src/components/MessageDialogLoad.tsx +++ b/frontend/src/components/MessageDialogLoad.tsx | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | 2 | ||
| 3 | import "../css/Dialog.css" | 3 | import "@css/Dialog.css" |
| 4 | 4 | ||
| 5 | interface MessageDialogLoadProps { | 5 | interface MessageDialogLoadProps { |
| 6 | title: string; | 6 | title: string; |
diff --git a/frontend/src/components/ModMenu.tsx b/frontend/src/components/ModMenu.tsx index 2fb1737..925b8a8 100644 --- a/frontend/src/components/ModMenu.tsx +++ b/frontend/src/components/ModMenu.tsx | |||
| @@ -2,11 +2,11 @@ import React from 'react'; | |||
| 2 | import ReactMarkdown from 'react-markdown'; | 2 | import ReactMarkdown from 'react-markdown'; |
| 3 | import { useNavigate } from 'react-router-dom'; | 3 | import { useNavigate } from 'react-router-dom'; |
| 4 | 4 | ||
| 5 | import { MapSummary } from '../types/Map'; | 5 | import { MapSummary } from '@customTypes/Map'; |
| 6 | import { ModMenuContent } from '../types/Content'; | 6 | import { ModMenuContent } from '@customTypes/Content'; |
| 7 | import { API } from '../api/Api'; | 7 | import { API } from '@api/Api'; |
| 8 | import "../css/ModMenu.css" | 8 | import "@css/ModMenu.css" |
| 9 | import useConfirm from '../hooks/UseConfirm'; | 9 | import useConfirm from '@hooks/UseConfirm'; |
| 10 | 10 | ||
| 11 | interface ModMenuProps { | 11 | interface ModMenuProps { |
| 12 | token?: string; | 12 | token?: string; |
diff --git a/frontend/src/components/RankingEntry.tsx b/frontend/src/components/RankingEntry.tsx index 25b0201..b899965 100644 --- a/frontend/src/components/RankingEntry.tsx +++ b/frontend/src/components/RankingEntry.tsx | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { Link } from "react-router-dom"; | 2 | import { Link } from "react-router-dom"; |
| 3 | import { RankingType, SteamRanking, SteamRankingType } from '../types/Ranking'; | 3 | import { RankingType, SteamRanking, SteamRankingType } from '@customTypes/Ranking'; |
| 4 | 4 | ||
| 5 | enum RankingCategories { | 5 | enum RankingCategories { |
| 6 | rankings_overall, | 6 | rankings_overall, |
diff --git a/frontend/src/components/Sidebar.tsx b/frontend/src/components/Sidebar.tsx index 5757183..67f7f3d 100644 --- a/frontend/src/components/Sidebar.tsx +++ b/frontend/src/components/Sidebar.tsx | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { Link, useLocation } from 'react-router-dom'; | 2 | import { Link, useLocation } from 'react-router-dom'; |
| 3 | 3 | ||
| 4 | import { BookIcon, FlagIcon, HelpIcon, HomeIcon, LogoIcon, PortalIcon, SearchIcon, UploadIcon } from '../images/Images'; | 4 | import { BookIcon, FlagIcon, HelpIcon, HomeIcon, LogoIcon, PortalIcon, SearchIcon, UploadIcon } from '@images/Images'; |
| 5 | import Login from './Login'; | 5 | import Login from '@components/Login'; |
| 6 | import { UserProfile } from '../types/Profile'; | 6 | import { UserProfile } from '@customTypes/Profile'; |
| 7 | import { Search } from '../types/Search'; | 7 | import { Search } from '@customTypes/Search'; |
| 8 | import { API } from '../api/Api'; | 8 | import { API } from '@api/Api'; |
| 9 | import "../css/Sidebar.css"; | 9 | import "@css/Sidebar.css"; |
| 10 | 10 | ||
| 11 | interface SidebarProps { | 11 | interface SidebarProps { |
| 12 | setToken: React.Dispatch<React.SetStateAction<string | undefined>>; | 12 | setToken: React.Dispatch<React.SetStateAction<string | undefined>>; |
diff --git a/frontend/src/components/Summary.tsx b/frontend/src/components/Summary.tsx index 79e989f..14b02ac 100644 --- a/frontend/src/components/Summary.tsx +++ b/frontend/src/components/Summary.tsx | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import ReactMarkdown from 'react-markdown'; | 2 | import ReactMarkdown from 'react-markdown'; |
| 3 | 3 | ||
| 4 | import { MapSummary } from '../types/Map'; | 4 | import { MapSummary } from '@customTypes/Map'; |
| 5 | import "../css/Maps.css" | 5 | import "@css/Maps.css" |
| 6 | 6 | ||
| 7 | interface SummaryProps { | 7 | interface SummaryProps { |
| 8 | selectedRun: number | 8 | selectedRun: number |
diff --git a/frontend/src/components/UploadRunDialog.tsx b/frontend/src/components/UploadRunDialog.tsx index 0610377..118b589 100644 --- a/frontend/src/components/UploadRunDialog.tsx +++ b/frontend/src/components/UploadRunDialog.tsx | |||
| @@ -1,15 +1,15 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { UploadRunContent } from '../types/Content'; | 2 | import { UploadRunContent } from '@customTypes/Content'; |
| 3 | import { ScoreboardTempUpdate, SourceDemoParser, NetMessages } from '@nekz/sdp'; | 3 | import { ScoreboardTempUpdate, SourceDemoParser, NetMessages } from '@nekz/sdp'; |
| 4 | 4 | ||
| 5 | import '../css/UploadRunDialog.css'; | 5 | import '@css/UploadRunDialog.css'; |
| 6 | import { Game } from '../types/Game'; | 6 | import { Game } from '@customTypes/Game'; |
| 7 | import { Map } from '../types/Map'; | 7 | import { Map } from '@customTypes/Map'; |
| 8 | import { API } from '../api/Api'; | 8 | import { API } from '@api/Api'; |
| 9 | import { useNavigate } from 'react-router-dom'; | 9 | import { useNavigate } from 'react-router-dom'; |
| 10 | import useMessage from '../hooks/UseMessage'; | 10 | import useMessage from '@hooks/UseMessage'; |
| 11 | import useConfirm from '../hooks/UseConfirm'; | 11 | import useConfirm from '@hooks/UseConfirm'; |
| 12 | import useMessageLoad from "../hooks/UseMessageLoad"; | 12 | import useMessageLoad from "@hooks/UseMessageLoad"; |
| 13 | 13 | ||
| 14 | interface UploadRunDialogProps { | 14 | interface UploadRunDialogProps { |
| 15 | token?: string; | 15 | token?: string; |
diff --git a/frontend/src/hooks/UseConfirm.tsx b/frontend/src/hooks/UseConfirm.tsx index 0d64224..e86d70d 100644 --- a/frontend/src/hooks/UseConfirm.tsx +++ b/frontend/src/hooks/UseConfirm.tsx | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | import React, { useState } from 'react'; | 1 | import React, { useState } from 'react'; |
| 2 | import ConfirmDialog from '../components/ConfirmDialog'; | 2 | import ConfirmDialog from '@components/ConfirmDialog'; |
| 3 | 3 | ||
| 4 | const useConfirm = () => { | 4 | const useConfirm = () => { |
| 5 | const [isOpen, setIsOpen] = useState(false); | 5 | const [isOpen, setIsOpen] = useState(false); |
diff --git a/frontend/src/hooks/UseMessage.tsx b/frontend/src/hooks/UseMessage.tsx index 13d8e4f..97ec746 100644 --- a/frontend/src/hooks/UseMessage.tsx +++ b/frontend/src/hooks/UseMessage.tsx | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | import React, { useState } from 'react'; | 1 | import React, { useState } from 'react'; |
| 2 | import MessageDialog from "../components/MessageDialog"; | 2 | import MessageDialog from "@components/MessageDialog"; |
| 3 | 3 | ||
| 4 | const useMessage = () => { | 4 | const useMessage = () => { |
| 5 | const [isOpen, setIsOpen] = useState(false); | 5 | const [isOpen, setIsOpen] = useState(false); |
diff --git a/frontend/src/hooks/UseMessageLoad.tsx b/frontend/src/hooks/UseMessageLoad.tsx index defd2b3..228c2b4 100644 --- a/frontend/src/hooks/UseMessageLoad.tsx +++ b/frontend/src/hooks/UseMessageLoad.tsx | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | import React, { useState } from 'react'; | 1 | import React, { useState } from 'react'; |
| 2 | import MessageDialogLoad from "../components/MessageDialogLoad"; | 2 | import MessageDialogLoad from "@components/MessageDialogLoad"; |
| 3 | 3 | ||
| 4 | const useMessageLoad = () => { | 4 | const useMessageLoad = () => { |
| 5 | const [isOpen, setIsOpen] = useState(false); | 5 | const [isOpen, setIsOpen] = useState(false); |
diff --git a/frontend/src/pages/About.tsx b/frontend/src/pages/About.tsx index c0883eb..ded3461 100644 --- a/frontend/src/pages/About.tsx +++ b/frontend/src/pages/About.tsx | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import ReactMarkdown from 'react-markdown'; | 2 | import ReactMarkdown from 'react-markdown'; |
| 3 | 3 | ||
| 4 | import '../css/About.css'; | 4 | import '@css/About.css'; |
| 5 | 5 | ||
| 6 | const About: React.FC = () => { | 6 | const About: React.FC = () => { |
| 7 | 7 | ||
diff --git a/frontend/src/pages/Games.tsx b/frontend/src/pages/Games.tsx index ea136c2..15105c9 100644 --- a/frontend/src/pages/Games.tsx +++ b/frontend/src/pages/Games.tsx | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | 2 | ||
| 3 | import GameEntry from '../components/GameEntry'; | 3 | import GameEntry from '@components/GameEntry'; |
| 4 | import { Game } from '../types/Game'; | 4 | import { Game } from '@customTypes/Game'; |
| 5 | import "../css/Maps.css" | 5 | import "@css/Maps.css" |
| 6 | 6 | ||
| 7 | interface GamesProps { | 7 | interface GamesProps { |
| 8 | games: Game[]; | 8 | games: Game[]; |
diff --git a/frontend/src/pages/Homepage.tsx b/frontend/src/pages/Homepage.tsx index 8c1cd48..68562b6 100644 --- a/frontend/src/pages/Homepage.tsx +++ b/frontend/src/pages/Homepage.tsx | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { PortalIcon } from '../images/Images'; | ||
| 3 | 2 | ||
| 4 | const Homepage: React.FC = () => { | 3 | const Homepage: React.FC = () => { |
| 5 | 4 | ||
diff --git a/frontend/src/pages/Maplist.tsx b/frontend/src/pages/Maplist.tsx index 4c1c172..8fc52b0 100644 --- a/frontend/src/pages/Maplist.tsx +++ b/frontend/src/pages/Maplist.tsx | |||
| @@ -1,11 +1,10 @@ | |||
| 1 | import React, { useEffect } from "react"; | 1 | import React, { useEffect } from "react"; |
| 2 | import { Link, useLocation, useNavigate, useParams } from "react-router-dom"; | 2 | import { Link, useLocation, useNavigate, useParams } from "react-router-dom"; |
| 3 | 3 | ||
| 4 | import "../css/Maplist.css"; | 4 | import "@css/Maplist.css"; |
| 5 | import { API } from "../api/Api"; | 5 | import { API } from "@api/Api"; |
| 6 | import { Game, GameChapters } from "../types/Game"; | 6 | import { Game } from "@customTypes/Game"; |
| 7 | import { GameChapter, GamesChapters } from "../types/Chapters"; | 7 | import { GameChapter, GamesChapters } from "@customTypes/Chapters"; |
| 8 | import { Map } from "../types/Map"; | ||
| 9 | 8 | ||
| 10 | const Maplist: React.FC = () => { | 9 | const Maplist: React.FC = () => { |
| 11 | const [game, setGame] = React.useState<Game | null>(null); | 10 | const [game, setGame] = React.useState<Game | null>(null); |
diff --git a/frontend/src/pages/Maps.tsx b/frontend/src/pages/Maps.tsx index 915b5f8..f1daa36 100644 --- a/frontend/src/pages/Maps.tsx +++ b/frontend/src/pages/Maps.tsx | |||
| @@ -1,14 +1,14 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { Link, useLocation } from 'react-router-dom'; | 2 | import { Link, useLocation } from 'react-router-dom'; |
| 3 | 3 | ||
| 4 | import { PortalIcon, FlagIcon, ChatIcon } from '../images/Images'; | 4 | import { PortalIcon, FlagIcon, ChatIcon } from '@images/Images'; |
| 5 | import Summary from '../components/Summary'; | 5 | import Summary from '@components/Summary'; |
| 6 | import Leaderboards from '../components/Leaderboards'; | 6 | import Leaderboards from '@components/Leaderboards'; |
| 7 | import Discussions from '../components/Discussions'; | 7 | import Discussions from '@components/Discussions'; |
| 8 | import ModMenu from '../components/ModMenu'; | 8 | import ModMenu from '@components/ModMenu'; |
| 9 | import { MapDiscussions, MapLeaderboard, MapSummary } from '../types/Map'; | 9 | import { MapDiscussions, MapLeaderboard, MapSummary } from '@customTypes/Map'; |
| 10 | import { API } from '../api/Api'; | 10 | import { API } from '@api/Api'; |
| 11 | import "../css/Maps.css"; | 11 | import "@css/Maps.css"; |
| 12 | 12 | ||
| 13 | interface MapProps { | 13 | interface MapProps { |
| 14 | token?: string; | 14 | token?: string; |
diff --git a/frontend/src/pages/Profile.tsx b/frontend/src/pages/Profile.tsx index 590bb9b..f7134a7 100644 --- a/frontend/src/pages/Profile.tsx +++ b/frontend/src/pages/Profile.tsx | |||
| @@ -1,16 +1,16 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { Link, useLocation, useNavigate } from 'react-router-dom'; | 2 | import { Link, useNavigate } from 'react-router-dom'; |
| 3 | 3 | ||
| 4 | import { SteamIcon, TwitchIcon, YouTubeIcon, PortalIcon, FlagIcon, StatisticsIcon, SortIcon, ThreedotIcon, DownloadIcon, HistoryIcon, DeleteIcon } from '../images/Images'; | 4 | import { SteamIcon, TwitchIcon, YouTubeIcon, PortalIcon, FlagIcon, StatisticsIcon, SortIcon, ThreedotIcon, DownloadIcon, HistoryIcon, DeleteIcon } from '@images/Images'; |
| 5 | import { UserProfile } from '../types/Profile'; | 5 | import { UserProfile } from '@customTypes/Profile'; |
| 6 | import { Game, GameChapters } from '../types/Game'; | 6 | import { Game, GameChapters } from '@customTypes/Game'; |
| 7 | import { Map } from '../types/Map'; | 7 | import { Map } from '@customTypes/Map'; |
| 8 | import { ticks_to_time } from '../utils/Time'; | 8 | import { ticks_to_time } from '@utils/Time'; |
| 9 | import "../css/Profile.css"; | 9 | import "@css/Profile.css"; |
| 10 | import { API } from '../api/Api'; | 10 | import { API } from '@api/Api'; |
| 11 | import useConfirm from '../hooks/UseConfirm'; | 11 | import useConfirm from '@hooks/UseConfirm'; |
| 12 | import useMessage from '../hooks/UseMessage'; | 12 | import useMessage from '@hooks/UseMessage'; |
| 13 | import useMessageLoad from "../hooks/UseMessageLoad"; | 13 | import useMessageLoad from "@hooks/UseMessageLoad"; |
| 14 | 14 | ||
| 15 | interface ProfileProps { | 15 | interface ProfileProps { |
| 16 | profile?: UserProfile; | 16 | profile?: UserProfile; |
diff --git a/frontend/src/pages/Rankings.tsx b/frontend/src/pages/Rankings.tsx index 1830815..cdb87a8 100644 --- a/frontend/src/pages/Rankings.tsx +++ b/frontend/src/pages/Rankings.tsx | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | import React, { useEffect } from "react"; | 1 | import React, { useEffect } from "react"; |
| 2 | 2 | ||
| 3 | import RankingEntry from "../components/RankingEntry"; | 3 | import RankingEntry from "@components/RankingEntry"; |
| 4 | import { Ranking, SteamRanking, RankingType, SteamRankingType } from "../types/Ranking"; | 4 | import { Ranking, SteamRanking, RankingType, SteamRankingType } from "@customTypes/Ranking"; |
| 5 | import { API } from "../api/Api"; | 5 | import { API } from "@api/Api"; |
| 6 | 6 | ||
| 7 | import "../css/Rankings.css"; | 7 | import "@css/Rankings.css"; |
| 8 | 8 | ||
| 9 | const Rankings: React.FC = () => { | 9 | const Rankings: React.FC = () => { |
| 10 | const [leaderboardData, setLeaderboardData] = React.useState<Ranking | SteamRanking>(); | 10 | const [leaderboardData, setLeaderboardData] = React.useState<Ranking | SteamRanking>(); |
diff --git a/frontend/src/pages/Rules.tsx b/frontend/src/pages/Rules.tsx index 340a9f6..b5625ce 100644 --- a/frontend/src/pages/Rules.tsx +++ b/frontend/src/pages/Rules.tsx | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import ReactMarkdown from 'react-markdown'; | 2 | import ReactMarkdown from 'react-markdown'; |
| 3 | 3 | ||
| 4 | import '../css/Rules.css'; | 4 | import '@css/Rules.css'; |
| 5 | 5 | ||
| 6 | const Rules: React.FC = () => { | 6 | const Rules: React.FC = () => { |
| 7 | 7 | ||
diff --git a/frontend/src/pages/User.tsx b/frontend/src/pages/User.tsx index ad230bd..f90d1aa 100644 --- a/frontend/src/pages/User.tsx +++ b/frontend/src/pages/User.tsx | |||
| @@ -1,14 +1,14 @@ | |||
| 1 | import React from 'react'; | 1 | import React from 'react'; |
| 2 | import { Link, useLocation, useNavigate } from 'react-router-dom'; | 2 | import { Link, useLocation, useNavigate } from 'react-router-dom'; |
| 3 | 3 | ||
| 4 | import { SteamIcon, TwitchIcon, YouTubeIcon, PortalIcon, FlagIcon, StatisticsIcon, SortIcon, ThreedotIcon, DownloadIcon, HistoryIcon } from '../images/Images'; | 4 | import { SteamIcon, TwitchIcon, YouTubeIcon, PortalIcon, FlagIcon, StatisticsIcon, SortIcon, ThreedotIcon, DownloadIcon, HistoryIcon } from '@images/Images'; |
| 5 | import { UserProfile } from '../types/Profile'; | 5 | import { UserProfile } from '@customTypes/Profile'; |
| 6 | import { Game, GameChapters } from '../types/Game'; | 6 | import { Game, GameChapters } from '@customTypes/Game'; |
| 7 | import { Map } from '../types/Map'; | 7 | import { Map } from '@customTypes/Map'; |
| 8 | import { API } from '../api/Api'; | 8 | import { API } from '@api/Api'; |
| 9 | import { ticks_to_time } from '../utils/Time'; | 9 | import { ticks_to_time } from '@utils/Time'; |
| 10 | import "../css/Profile.css"; | 10 | import "@css/Profile.css"; |
| 11 | import useMessage from '../hooks/UseMessage'; | 11 | import useMessage from '@hooks/UseMessage'; |
| 12 | 12 | ||
| 13 | interface UserProps { | 13 | interface UserProps { |
| 14 | profile?: UserProfile; | 14 | profile?: UserProfile; |
diff --git a/frontend/src/types/Chapters.tsx b/frontend/src/types/Chapters.ts index 2c0afdd..1d48306 100644 --- a/frontend/src/types/Chapters.tsx +++ b/frontend/src/types/Chapters.ts | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | import { Game } from "./Game"; | 1 | import type { Game } from "@customTypes/Game"; |
| 2 | import { Map } from "./Map"; | 2 | import type { Map } from "@customTypes/Map"; |
| 3 | 3 | ||
| 4 | interface Chapter { | 4 | interface Chapter { |
| 5 | id: number; | 5 | id: number; |
diff --git a/frontend/src/types/Content.tsx b/frontend/src/types/Content.ts index 42a6917..42a6917 100644 --- a/frontend/src/types/Content.tsx +++ b/frontend/src/types/Content.ts | |||
diff --git a/frontend/src/types/Game.tsx b/frontend/src/types/Game.ts index eb435f6..1a80341 100644 --- a/frontend/src/types/Game.tsx +++ b/frontend/src/types/Game.ts | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | import { Map } from './Map'; | 1 | import type { Map } from '@customTypes/Map'; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | export interface Game { | 4 | export interface Game { |
diff --git a/frontend/src/types/Map.tsx b/frontend/src/types/Map.ts index 4669e8b..89c66d5 100644 --- a/frontend/src/types/Map.tsx +++ b/frontend/src/types/Map.ts | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | import { Category, GameCategoryPortals } from './Game'; | 1 | import type { Category, GameCategoryPortals } from '@customTypes/Game'; |
| 2 | import { Pagination } from './Pagination'; | 2 | import type { Pagination } from '@customTypes/Pagination'; |
| 3 | import { UserShort } from './Profile'; | 3 | import type { UserShort } from '@customTypes/Profile'; |
| 4 | 4 | ||
| 5 | export interface Map { | 5 | export interface Map { |
| 6 | id: number; | 6 | id: number; |
diff --git a/frontend/src/types/Pagination.tsx b/frontend/src/types/Pagination.ts index ccff04b..ccff04b 100644 --- a/frontend/src/types/Pagination.tsx +++ b/frontend/src/types/Pagination.ts | |||
diff --git a/frontend/src/types/Profile.tsx b/frontend/src/types/Profile.ts index 2bb037c..42e5c3e 100644 --- a/frontend/src/types/Profile.tsx +++ b/frontend/src/types/Profile.ts | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | import { Pagination } from "./Pagination"; | 1 | import type { Pagination } from "@customTypes/Pagination"; |
| 2 | 2 | ||
| 3 | export interface UserShort { | 3 | export interface UserShort { |
| 4 | steam_id: string; | 4 | steam_id: string; |
diff --git a/frontend/src/types/Ranking.tsx b/frontend/src/types/Ranking.ts index b3b26c6..a143355 100644 --- a/frontend/src/types/Ranking.tsx +++ b/frontend/src/types/Ranking.ts | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | import { UserShort } from "./Profile"; | 1 | import type { UserShort } from "@customTypes/Profile"; |
| 2 | 2 | ||
| 3 | export interface RankingType { | 3 | export interface RankingType { |
| 4 | placement: number; | 4 | placement: number; |
diff --git a/frontend/src/types/Search.tsx b/frontend/src/types/Search.ts index 766311a..d218806 100644 --- a/frontend/src/types/Search.tsx +++ b/frontend/src/types/Search.ts | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | import { UserShort } from "./Profile"; | 1 | import type { UserShort } from "@customTypes/Profile"; |
| 2 | 2 | ||
| 3 | export interface Search { | 3 | export interface Search { |
| 4 | players: UserShort[]; | 4 | players: UserShort[]; |
diff --git a/frontend/src/utils/Jwt.tsx b/frontend/src/utils/Jwt.ts index ce351fb..ce351fb 100644 --- a/frontend/src/utils/Jwt.tsx +++ b/frontend/src/utils/Jwt.ts | |||
diff --git a/frontend/src/utils/Time.tsx b/frontend/src/utils/Time.ts index b83a7ed..b83a7ed 100644 --- a/frontend/src/utils/Time.tsx +++ b/frontend/src/utils/Time.ts | |||