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