Vasily Permyakov 3 år sedan
förälder
incheckning
355d5b50bd

+ 1 - 3
src/components/App.js

@@ -2,9 +2,7 @@ import Routes from "./routes";
 
 function App() {
     return (
-        <div>
-          <Routes/>
-        </div>
+        <Routes/>
     );
 }
 

+ 11 - 0
src/components/appBar/index.js

@@ -0,0 +1,11 @@
+import React from "react";
+
+const AppBar = ()=>{
+    return (
+        <>
+
+        </>
+    )
+}
+
+export default AppBar;

+ 0 - 11
src/components/redux/store.js

@@ -1,11 +0,0 @@
-import {applyMiddleware, combineReducers, createStore} from "redux";
-import thunkMiddleware from "redux-thunk";
-
-let reducers = combineReducers({
-
-});
-
-
-let store = createStore(reducers, applyMiddleware(thunkMiddleware));
-
-export default store;

+ 0 - 14
src/components/routes/index.js

@@ -1,14 +0,0 @@
-import React from "react";
-
-import {Switch, Route} from "react-router-dom";
-import MainPage from "../pages/MainPage";
-
-const Routes = ()=>{
-    return (
-        <Switch>
-            <Route exect path='/' component={MainPage}/>
-        </Switch>
-    )
-}
-
-export default Routes;

+ 9 - 0
src/components/sideBar/leftBar/index.js

@@ -0,0 +1,9 @@
+import React from "react";
+
+const LeftBar = ()=>{
+    return (
+        <></>
+    )
+}
+
+export default LeftBar;

+ 9 - 0
src/components/sideBar/rightBar/index.js

@@ -0,0 +1,9 @@
+import React from "react";
+
+const RightBar = ()=>{
+    return (
+        <></>
+    )
+}
+
+export default RightBar;

+ 22 - 0
src/components/wrapper/index.js

@@ -0,0 +1,22 @@
+import React from "react";
+import AppBar from "../appBar";
+import LeftBar from "../sideBar/leftBar";
+import RightBar from "../sideBar/rightBar";
+
+const Wrapper = ({child}) => {
+    console.log(child)
+    return (
+        <>
+            <AppBar/>
+            <LeftBar/>
+            <RightBar/>
+            <div>
+                <main>
+                    {child}
+                </main>
+            </div>
+        </>
+    )
+}
+
+export default Wrapper;

+ 11 - 0
src/components/wrapper/modals.js

@@ -0,0 +1,11 @@
+import React from "react";
+
+const ModalWrapper = ({child})=>{
+    return (
+        <>
+            {child}
+        </>
+    )
+}
+
+export default ModalWrapper;

+ 4 - 4
src/index.js

@@ -1,16 +1,16 @@
 import React from 'react';
 import ReactDOM from 'react-dom';
-import App from './components/App';
+import App from './App';
 import reportWebVitals from './reportWebVitals';
 import {BrowserRouter} from "react-router-dom";
 import {Provider} from "react-redux";
-import store from './components/redux/store'
+import store from './redux/store'
 
 ReactDOM.render(
     <BrowserRouter>
-        <Provider store={store}>
+        {/*<Provider store={store}>*/}
             <App/>
-        </Provider>
+        {/*</Provider>*/}
     </BrowserRouter>,
     document.getElementById('root')
 );

+ 3 - 3
src/components/pages/MainPage.js

@@ -2,9 +2,9 @@ import React from "react";
 
 const MainPage = ({})=>{
     return (
-        <div>
-            asdas23
-        </div>
+        <>
+            main
+        </>
     )
 }
 

+ 11 - 0
src/redux/store.js

@@ -0,0 +1,11 @@
+// import {applyMiddleware, combineReducers, createStore} from "redux";
+// import thunkMiddleware from "redux-thunk";
+//
+// let reducers = combineReducers({
+//
+// });
+//
+//
+// let store = createStore(reducers, applyMiddleware(thunkMiddleware));
+//
+// export default store;

+ 22 - 0
src/routes/index.js

@@ -0,0 +1,22 @@
+import React from "react";
+
+import {Switch, Route, Redirect} from "react-router-dom";
+import MainPage from "../pages/MainPage";
+import Wrapper from "../components/wrapper";
+
+
+const Routes = () => {
+    return (
+        // <Wrapper>
+            <Switch>
+                <Route exect path='/' component={MainPage}/>
+                <Route exect path='/404' component={MainPage}/>
+                <Route path="*">
+                    <Redirect to="/"/>
+                </Route>
+            </Switch>
+        // </Wrapper>
+    )
+}
+
+export default Routes;

+ 8 - 0
src/theme/index.js

@@ -0,0 +1,8 @@
+import React from "react";
+import {createTheme} from "@mui/material";
+
+const theme = createTheme({
+
+})
+
+export default theme;