different reactappcontroller mapping
This commit is contained in:
parent
50a8d7d0f8
commit
49dcd38ab3
@ -1,8 +1,7 @@
|
|||||||
package djmil.cordacheckers;
|
package djmil.cordacheckers;
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
@ -11,8 +10,9 @@ 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/*", "/about","/leaderboard" })
|
||||||
@PutMapping("/error")
|
// @PutMapping("/error")
|
||||||
|
@RequestMapping(value = { "/", "/{x:[\\w\\-]+}", "/{x:^(?!api$).*$}/*/{y:[\\w\\-]+}","/error" })
|
||||||
public String getIndex(HttpServletRequest inRequest) {
|
public String getIndex(HttpServletRequest inRequest) {
|
||||||
return "/index.html";
|
return "/index.html";
|
||||||
}
|
}
|
||||||
|
@ -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/
|
||||||
|
@ -46,15 +46,13 @@ function ViewSelector() {
|
|||||||
const guide = useContext(GamesGuideContext);
|
const guide = useContext(GamesGuideContext);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<nav>
|
<nav className='ViewSelector'>
|
||||||
<div className='ViewSelector'>
|
|
||||||
<div className='Container' >
|
<div className='Container' >
|
||||||
<Link to='new'>New</Link>
|
<Link to='new'>New</Link>
|
||||||
<Link to='proposal'>Proposal<Counter number={guide.awaiting.proposal} /></Link>
|
<Link to='proposal'>Proposal<Counter number={guide.awaiting.proposal} /></Link>
|
||||||
<Link to='active' >Active<Counter number={guide.awaiting.active} /></Link>
|
<Link to='active' >Active<Counter number={guide.awaiting.active} /></Link>
|
||||||
<Link to='archive' >Archive</Link>
|
<Link to='archive' >Archive</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</nav>
|
</nav>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user