diff --git a/frontend/static/js/index.js b/frontend/static/js/index.js index e923833..56d5aca 100644 --- a/frontend/static/js/index.js +++ b/frontend/static/js/index.js @@ -8,6 +8,8 @@ import HomeView from "./views/HomeView.js"; import RegisterView from "./views/accounts/RegisterView.js"; import LogoutView from "./views/accounts/LogoutView.js"; +import GameView from "./views/Game.js" + import { Client } from "./api/client.js"; import AbstractRedirectView from "./views/AbstractRedirectView.js"; import MeView from "./views/MeView.js"; @@ -44,6 +46,7 @@ const router = async (uri = "") => { { path: "/chat", view: Chat }, { path: "/home", view: HomeView }, { path: "/me", view: MeView }, + { path: "/game", view: GameView }, ]; // Test each route for potential match @@ -96,4 +99,4 @@ document.addEventListener("DOMContentLoaded", () => { router(location.pathname); }); -export { client, navigateTo } \ No newline at end of file +export { client, navigateTo } diff --git a/frontend/static/js/views/Game.js b/frontend/static/js/views/Game.js new file mode 100644 index 0000000..312c405 --- /dev/null +++ b/frontend/static/js/views/Game.js @@ -0,0 +1,63 @@ +import AbstractView from './AbstractView.js' + +export default class extends AbstractView { + constructor(params) { + super(params, 'Game'); + } + + async getHtml() { + return ` +