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
import React from "react"; | |
const AppContext = React.createContext(); | |
export default AppContext; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<link rel="icon" href="%PUBLIC_URL%/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" |
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
import React from "react"; | |
function DropdownList() { | |
return ( | |
<div class="dropdown-menu profile-menu"> | |
<a class="dropdown-item" href="#"> | |
Profile | |
</a> | |
<a class="dropdown-item" href="#"> | |
Account |
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
import React, { useState } from "react"; | |
import onClickOutside from "react-onclickoutside"; | |
import DropdownList from "./DropDownList"; | |
function DropdownLink(props) { | |
const [showDropdown, setShowDropdown] = useState(false); | |
DropdownLink.handleClickOutside = () => { | |
setShowDropdown(false); | |
}; |
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
import Navigation from "./components/Navigation"; | |
import "./App.css"; | |
function App() { | |
return ( | |
<div className="App"> | |
<Navigation /> | |
</div> | |
); | |
} |
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
.profile-link { | |
cursor: pointer; | |
} | |
.profile-menu { | |
display: block; | |
right: 0; | |
left: auto; | |
} |
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
// index.js | |
import React from "react"; | |
import ReactDOM from "react-dom"; | |
import "bootstrap/dist/css/bootstrap.min.css"; | |
import "./assets/scss/style.scss"; | |
import App from "./App"; | |
import { BrowserRouter } from "react-router-dom"; | |
import { Provider } from "react-redux"; |
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
// store/index.js | |
import { createStore, applyMiddleware, compose } from "redux"; | |
import createSagaMiddleware from "redux-saga"; | |
import rootReducer from "./reducers"; | |
import rootSaga from "./sagas"; | |
const sagaMiddleware = createSagaMiddleware(); | |
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; |