fix(Index.js): 404 Error when joining the website
This commit is contained in:
parent
e21c00e930
commit
2c508fab46
@ -18,7 +18,6 @@ import TournamentsListView from "./views/tournament/TournamentsListView.js";
|
|||||||
import TournamentCreateView from "./views/tournament/TournamentCreateView.js";
|
import TournamentCreateView from "./views/tournament/TournamentCreateView.js";
|
||||||
import AuthenticationView from "./views/accounts/AuthenticationView.js";
|
import AuthenticationView from "./views/accounts/AuthenticationView.js";
|
||||||
import TicTacToeView from "./views/TicTacToeView.js";
|
import TicTacToeView from "./views/TicTacToeView.js";
|
||||||
import TicTacToeOnlineView from "./views/TicTacToeViewOnline.js";
|
|
||||||
import GameHistoryView from "./views/GameHistoryView.js";
|
import GameHistoryView from "./views/GameHistoryView.js";
|
||||||
|
|
||||||
let client = new Client(location.origin);
|
let client = new Client(location.origin);
|
||||||
@ -77,6 +76,7 @@ async function renderView(view)
|
|||||||
const router = async(uri) => {
|
const router = async(uri) => {
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
|
{ path: "/", view: HomeView},
|
||||||
{ path: "/profiles/:id/history", view: GameHistoryView },
|
{ path: "/profiles/:id/history", view: GameHistoryView },
|
||||||
{ path: "/profiles/:username", view: ProfilePageView },
|
{ path: "/profiles/:username", view: ProfilePageView },
|
||||||
{ path: "/tournaments/create", view: TournamentCreateView },
|
{ path: "/tournaments/create", view: TournamentCreateView },
|
||||||
@ -91,7 +91,6 @@ const router = async(uri) => {
|
|||||||
{ path: "/matchmaking", view: MatchMakingView },
|
{ path: "/matchmaking", view: MatchMakingView },
|
||||||
{ path: "/games/offline", view: GameOfflineView },
|
{ path: "/games/offline", view: GameOfflineView },
|
||||||
{ path: "/tictactoe", view: TicTacToeView },
|
{ path: "/tictactoe", view: TicTacToeView },
|
||||||
{ path: "/tictactoeonline", view: TicTacToeOnlineView },
|
|
||||||
{ path: "/games/:id/0", view: GameView2D },
|
{ path: "/games/:id/0", view: GameView2D },
|
||||||
{ path: "/games/:id/1", view: GameView3D },
|
{ path: "/games/:id/1", view: GameView3D },
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user