Compare commits

..

No commits in common. "6989f56366ccb3e7b3b55ac1aeae012bc78a4719" and "4f6f59f76df9707f98ea8de5d8a79fe16b06c0bb" have entirely different histories.

5 changed files with 9 additions and 11 deletions

View File

@ -11,7 +11,7 @@ public class ReactAppController {
// This controller simply redirects all UI related routes // This controller simply redirects all UI related routes
// to index.html, allowing react and react-router to work its magic // to index.html, allowing react and react-router to work its magic
@GetMapping(value = { "", "/", "/games", "/games/*", "/about","/leaderboard" }) @GetMapping(value = { "", "/", "/games", "/games/new", "/games/proposal", "/games/active", "/games/archive", "/about","/leaderboard" })
@PutMapping("/error") @PutMapping("/error")
public String getIndex(HttpServletRequest inRequest) { public String getIndex(HttpServletRequest inRequest) {
return "/index.html"; return "/index.html";

2
webapp/.gitignore vendored
View File

@ -21,5 +21,3 @@
npm-debug.log* npm-debug.log*
yarn-debug.log* yarn-debug.log*
yarn-error.log* yarn-error.log*
package-lock.json

View File

@ -9,7 +9,7 @@
"fsevents": "^2.3.3", "fsevents": "^2.3.3",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-router-dom": "^6.20.1", "react-router-dom": "^6.16.0",
"react-scripts": "^5.0.1", "react-scripts": "^5.0.1",
"web-vitals": "^3.5.0" "web-vitals": "^3.5.0"
}, },

View File

@ -9,7 +9,7 @@
name="description" name="description"
content="Web site created using create-react-app" content="Web site created using create-react-app"
/> />
<!-- <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> --> <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!-- <!--
manifest.json provides metadata used when your web app is installed on a manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/

View File

@ -1,6 +1,6 @@
import React, { useContext, useEffect } from 'react'; import React, { useContext, useEffect } from 'react';
import { GamesStateContext, GamesGuideContext } from '../context/games'; import { GamesStateContext, GamesGuideContext } from '../context/games';
import { Routes, Route, Link } from 'react-router-dom'; import { NavLink, Routes, Route } from 'react-router-dom';
import NewGame from './games/NewGame'; import NewGame from './games/NewGame';
import { GameProposalSelector, ActiveGameSelector, GameArchiveSelector } from './games/GameSelector'; import { GameProposalSelector, ActiveGameSelector, GameArchiveSelector } from './games/GameSelector';
@ -46,12 +46,12 @@ function ViewSelector() {
const guide = useContext(GamesGuideContext); const guide = useContext(GamesGuideContext);
return ( return (
<nav className='ViewSelector'> <nav className='ViewSelector' >
<div className='Container' > <div className='Container' >
<Link to='new'>New</Link> <NavLink to='new'>New</NavLink>
<Link to='proposal'>Proposal<Counter number={guide.awaiting.proposal} /></Link> <NavLink to='proposal'>Proposal<Counter number={guide.awaiting.proposal} /></NavLink>
<Link to='active' >Active<Counter number={guide.awaiting.active} /></Link> <NavLink to='active' >Active<Counter number={guide.awaiting.active} /></NavLink>
<Link to='archive' >Archive</Link> <NavLink to='archive' >Archive</NavLink>
</div> </div>
</nav> </nav>
) )