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