forked from Axolotl-CS47/Axolotl
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from stabrabbit-47/feature-abeer
Feature abeer
- Loading branch information
Showing
15 changed files
with
28,640 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const setCurrentCity = (currentCity) => { | ||
return { | ||
type: "SET_CURRENT_CITY", | ||
payload: currentCity, | ||
}; | ||
}; | ||
export default setCurrentCity; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import App from '../client/App.jsx' | ||
import React from "react"; | ||
import ReactDOM from "react-dom"; | ||
import App from "../client/App.jsx"; | ||
import { BrowserRouter, Route, Routes } from "react-router-dom"; | ||
import { Provider } from "react-redux"; | ||
import store from "./store"; | ||
import Dashboard from "./Components/Dashboard.jsx"; | ||
|
||
ReactDOM.render( | ||
<App />, | ||
document.getElementById('root') | ||
); | ||
<Provider store={store}> | ||
<BrowserRouter> | ||
<Routes> | ||
<Route path="/" element={<App />}></Route> | ||
<Route path="/dashboard" element={<Dashboard />}></Route> | ||
</Routes> | ||
</BrowserRouter> | ||
</Provider>, | ||
document.getElementById("root") | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const initialState = { currentCity: '' }; | ||
const mapReducer = (state = initialState, action) => { | ||
switch (action.type) { | ||
case "SET_CURRENT_CITY": { | ||
return { | ||
...state, | ||
currentCity: action.payload, | ||
}; | ||
} | ||
default: | ||
return state; | ||
} | ||
}; | ||
export default mapReducer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { createStore } from "redux"; | ||
import mapReducer from "./reducers/mapReducer"; | ||
|
||
const store = createStore(mapReducer); | ||
|
||
export default store; |
Oops, something went wrong.