Updating
This commit is contained in:
parent
30686ec408
commit
8a69531e71
@ -3,6 +3,8 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@material-ui/core": "^4.12.3",
|
||||
"@material-ui/lab": "^4.0.0-alpha.60",
|
||||
"@testing-library/jest-dom": "^5.16.1",
|
||||
"@testing-library/react": "^12.1.2",
|
||||
"@testing-library/user-event": "^13.5.0",
|
||||
|
@ -1,11 +1,17 @@
|
||||
import { createBrowserHistory } from 'history';
|
||||
|
||||
// Run our app under the /base URL.
|
||||
const history = createBrowserHistory(),
|
||||
push = history.push;
|
||||
history.push = (path) => {
|
||||
const base = new URL(document.querySelector("base") ? document.querySelector("base").href : "");
|
||||
push(base.pathname + path);
|
||||
};
|
||||
|
||||
export default history;
|
||||
import { createBrowserHistory } from 'history';
|
||||
|
||||
/*
|
||||
// Run our app under the /base URL.
|
||||
const history = createBrowserHistory(),
|
||||
push = history.push;
|
||||
history.push = (path) => {
|
||||
const base = new URL(document.querySelector("base") ? document.querySelector("base").href : "");
|
||||
push(base.pathname + path);
|
||||
};
|
||||
*/
|
||||
|
||||
export default history = createBrowserHistory({
|
||||
basename: process.env.PUBLIC_URL
|
||||
});
|
||||
|
||||
//export default history;
|
61
src/index.js
61
src/index.js
@ -1,15 +1,50 @@
|
||||
import React from "react";
|
||||
import { render } from "react-dom";
|
||||
import { BrowserRouter } from "react-router-dom";
|
||||
import App from "./App.js";
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import './index.css';
|
||||
import App from './App';
|
||||
import reportWebVitals from './reportWebVitals';
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
console.log('DEVELOPMENT mode!');
|
||||
}
|
||||
ReactDOM.render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>,
|
||||
document.getElementById('root')
|
||||
);
|
||||
|
||||
render(
|
||||
<BrowserRouter basename="/">
|
||||
<App/>
|
||||
</BrowserRouter>,
|
||||
document.getElementById("root")
|
||||
)
|
||||
// If you want to start measuring performance in your app, pass a function
|
||||
// to log results (for example: reportWebVitals(console.log))
|
||||
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
||||
reportWebVitals();
|
||||
/*
|
||||
-import React from "react";
|
||||
-import { render } from "react-dom";
|
||||
-import { BrowserRouter } from "react-router-dom";
|
||||
-import App from "./App.js";
|
||||
+import React from 'react';
|
||||
+import ReactDOM from 'react-dom';
|
||||
+import './index.css';
|
||||
+import App from './App';
|
||||
+import reportWebVitals from './reportWebVitals';
|
||||
|
||||
-if (process.env.NODE_ENV !== 'production') {
|
||||
- console.log('DEVELOPMENT mode!');
|
||||
-}
|
||||
+ReactDOM.render(
|
||||
+ <React.StrictMode>
|
||||
+ <App />
|
||||
+ </React.StrictMode>,
|
||||
+ document.getElementById('root')
|
||||
+);
|
||||
|
||||
-render(
|
||||
- <BrowserRouter basename="/">
|
||||
- <App/>
|
||||
- </BrowserRouter>,
|
||||
- document.getElementById("root")
|
||||
-)
|
||||
\ No newline at end of file
|
||||
+// If you want to start measuring performance in your app, pass a function
|
||||
+// to log results (for example: reportWebVitals(console.log))
|
||||
+// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
||||
+reportWebVitals();
|
||||
*/
|
Loading…
x
Reference in New Issue
Block a user