From c9019b6e0376cda7c08d94b7ce8368ed4aea5e56 Mon Sep 17 00:00:00 2001 From: djmil Date: Fri, 1 Dec 2023 23:17:51 +0100 Subject: [PATCH 1/6] initial --- .../src/main/java/djmil/cordacheckers/ReactAppController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/djmil/cordacheckers/ReactAppController.java b/backend/src/main/java/djmil/cordacheckers/ReactAppController.java index d30b76d..ffd82bf 100644 --- a/backend/src/main/java/djmil/cordacheckers/ReactAppController.java +++ b/backend/src/main/java/djmil/cordacheckers/ReactAppController.java @@ -11,7 +11,7 @@ public class ReactAppController { // This controller simply redirects all UI related routes // to index.html, allowing react and react-router to work its magic - @GetMapping(value = { "", "/", "/games", "/games/new", "/games/proposal", "/games/active", "/games/archive", "/about","/leaderboard" }) + @GetMapping(value = { "", "/", "/games", "/games/*", "/about","/leaderboard" }) @PutMapping("/error") public String getIndex(HttpServletRequest inRequest) { return "/index.html"; -- 2.45.2 From 04590e3be55a2b451541bbdf1ad3d58b54d8e635 Mon Sep 17 00:00:00 2001 From: djmil Date: Fri, 1 Dec 2023 23:30:36 +0100 Subject: [PATCH 2/6] absolute path for /game/views --- .../main/java/djmil/cordacheckers/ReactAppController.java | 2 +- webapp/src/container/Games.jsx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/src/main/java/djmil/cordacheckers/ReactAppController.java b/backend/src/main/java/djmil/cordacheckers/ReactAppController.java index ffd82bf..5cfc464 100644 --- a/backend/src/main/java/djmil/cordacheckers/ReactAppController.java +++ b/backend/src/main/java/djmil/cordacheckers/ReactAppController.java @@ -11,7 +11,7 @@ public class ReactAppController { // This controller simply redirects all UI related routes // to index.html, allowing react and react-router to work its magic - @GetMapping(value = { "", "/", "/games", "/games/*", "/about","/leaderboard" }) + @GetMapping(value = { "", "/", "/games", "/games/*", "/about","/leaderboard" }) @PutMapping("/error") public String getIndex(HttpServletRequest inRequest) { return "/index.html"; diff --git a/webapp/src/container/Games.jsx b/webapp/src/container/Games.jsx index 8bcaae2..35c0679 100644 --- a/webapp/src/container/Games.jsx +++ b/webapp/src/container/Games.jsx @@ -48,10 +48,10 @@ function ViewSelector() { return ( ) -- 2.45.2 From 50a8d7d0f8967e7ce71f2d20ba3d7bdd9475a010 Mon Sep 17 00:00:00 2001 From: djmil Date: Sat, 2 Dec 2023 00:49:36 +0100 Subject: [PATCH 3/6] link --- webapp/src/container/Games.jsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/webapp/src/container/Games.jsx b/webapp/src/container/Games.jsx index 35c0679..f85761c 100644 --- a/webapp/src/container/Games.jsx +++ b/webapp/src/container/Games.jsx @@ -1,6 +1,6 @@ import React, { useContext, useEffect } from 'react'; import { GamesStateContext, GamesGuideContext } from '../context/games'; -import { NavLink, Routes, Route } from 'react-router-dom'; +import { Routes, Route, Link } from 'react-router-dom'; import NewGame from './games/NewGame'; import { GameProposalSelector, ActiveGameSelector, GameArchiveSelector } from './games/GameSelector'; @@ -46,12 +46,14 @@ function ViewSelector() { const guide = useContext(GamesGuideContext); return ( -