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/posts/actionTypes.js | |
export const GET_POSTS = "GET_POSTS"; | |
export const GET_POSTS_SUCCESS = "GET_POSTS_SUCCESS"; | |
export const GET_POSTS_FAIL = "GET_POSTS_FAIL"; | |
export const GET_POST_DETAILS = "GET_POST_DETAILS"; | |
export const GET_POST_DETAILS_SUCCESS = "GET_POST_DETAILS_SUCCESS"; | |
export const GET_POST_DETAILS_FAIL = "GET_POST_DETAILS_FAIL"; |
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
// App.js | |
import React from "react"; | |
import Home from "./pages/Home"; | |
import Singlepost from "./pages/SinglePost"; | |
import { BrowserRouter as Router, Route, Switch } from "react-router-dom"; | |
import "react-loader-spinner/dist/loader/css/react-spinner-loader.css"; | |
import Navigation from "./components/Navigation"; | |
function 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
// assets/scss/style.scss | |
a { | |
text-decoration: none !important; | |
} | |
.home { | |
margin-top: 2rem; | |
.posts { | |
display: flex; | |
justify-content: center; |
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; |
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
.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
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
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); | |
}; |