Commit dbb64849 authored by Michal Čížek's avatar Michal Čížek
Browse files

possible fix to forwarding

parent d0a3beca
...@@ -13,6 +13,6 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; ...@@ -13,6 +13,6 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
public class ViewControllerConfig implements WebMvcConfigurer { public class ViewControllerConfig implements WebMvcConfigurer {
@Override @Override
public void addViewControllers(ViewControllerRegistry registry) { public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController(PathsConfig.ROOT).setViewName("forward:/index.html"); registry.addViewController(PathsConfig.ROOT + "/**").setViewName("forward:/index.html");
} }
} }
{ {
"files": { "files": {
"main.css": "/static/css/main.6a09d879.css", "main.css": "/static/css/main.6a09d879.css",
"main.js": "/static/js/main.142066fa.js", "main.js": "/static/js/main.b56f760b.js",
"static/js/787.cda612ba.chunk.js": "/static/js/787.cda612ba.chunk.js", "static/js/787.cda612ba.chunk.js": "/static/js/787.cda612ba.chunk.js",
"index.html": "/index.html", "index.html": "/index.html",
"main.6a09d879.css.map": "/static/css/main.6a09d879.css.map", "main.6a09d879.css.map": "/static/css/main.6a09d879.css.map",
"main.142066fa.js.map": "/static/js/main.142066fa.js.map", "main.b56f760b.js.map": "/static/js/main.b56f760b.js.map",
"787.cda612ba.chunk.js.map": "/static/js/787.cda612ba.chunk.js.map" "787.cda612ba.chunk.js.map": "/static/js/787.cda612ba.chunk.js.map"
}, },
"entrypoints": [ "entrypoints": [
"static/css/main.6a09d879.css", "static/css/main.6a09d879.css",
"static/js/main.142066fa.js" "static/js/main.b56f760b.js"
] ]
} }
\ No newline at end of file
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Flea Market Manager</title><script defer="defer" src="/static/js/main.142066fa.js"></script><link href="/static/css/main.6a09d879.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html> <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Flea Market Manager</title><script defer="defer" src="/static/js/main.b56f760b.js"></script><link href="/static/css/main.6a09d879.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
\ No newline at end of file \ No newline at end of file
/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* React Router DOM v6.3.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
/**
* React Router v6.3.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { MantineProvider } from "@mantine/core"; import { MantineProvider } from "@mantine/core";
import { QueryClientProvider, QueryClient } from "react-query"; import { QueryClientProvider, QueryClient } from "react-query";
import { HashRouter } from "react-router-dom"; import { BrowserRouter } from "react-router-dom";
import axios from "axios"; import axios from "axios";
import { AuthProvider } from "context/auth/auth-provider"; import { AuthProvider } from "context/auth/auth-provider";
...@@ -13,7 +13,7 @@ axios.defaults.withCredentials = true; ...@@ -13,7 +13,7 @@ axios.defaults.withCredentials = true;
export const App = () => { export const App = () => {
return ( return (
<HashRouter <BrowserRouter
basename={process.env.NODE_ENV === "development" ? undefined : "/pa165"} basename={process.env.NODE_ENV === "development" ? undefined : "/pa165"}
> >
<MantineProvider> <MantineProvider>
...@@ -27,6 +27,6 @@ export const App = () => { ...@@ -27,6 +27,6 @@ export const App = () => {
</NotificationProvider> </NotificationProvider>
</QueryClientProvider> </QueryClientProvider>
</MantineProvider> </MantineProvider>
</HashRouter> </BrowserRouter>
); );
}; };
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment