File Cleaning Part 2 - Final
This commit is contained in:
1 parent
89f366ff35
commit
06b43f4d06
26 files changed
-628
No files matched your search
@@ -1,14 +0,0 @@
|
||||
import React, { Component } from 'react';
|
||||
import {Redirect} from 'react-router';
|
||||
import {auth} from '../App';
|
||||
|
||||
class Logout extends Component {
|
||||
render() {
|
||||
//window.localStorage.removeItem("user");
|
||||
auth.logout();
|
||||
|
||||
return <Redirect to='/' />
|
||||
}
|
||||
}
|
||||
|
||||
export default Logout
|
||||
@@ -1,48 +0,0 @@
|
||||
import React from 'react';
|
||||
import Button from '@material-ui/core/Button';
|
||||
import Dialog from '@material-ui/core/Dialog';
|
||||
import DialogActions from '@material-ui/core/DialogActions';
|
||||
import DialogContent from '@material-ui/core/DialogContent';
|
||||
import DialogContentText from '@material-ui/core/DialogContentText';
|
||||
import DialogTitle from '@material-ui/core/DialogTitle';
|
||||
|
||||
class Modules extends React.Component {
|
||||
state = {
|
||||
open: true,
|
||||
};
|
||||
|
||||
handleClickOpen = () => {
|
||||
this.setState({ open: true });
|
||||
};
|
||||
|
||||
handleClose = () => {
|
||||
this.setState({ open: false });
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<Dialog
|
||||
open={this.state.open}
|
||||
onClose={this.handleClose}
|
||||
aria-labelledby="alert-dialog-title"
|
||||
aria-describedby="alert-dialog-description"
|
||||
>
|
||||
<DialogTitle id="alert-dialog-title">{"Section under development."}</DialogTitle>
|
||||
<DialogContent>
|
||||
<DialogContentText id="alert-dialog-description">
|
||||
The functionality of this section has not been developed yet. We expect to have it for November 2018. Thanks for your understanding.
|
||||
</DialogContentText>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<Button onClick={this.handleClose} color="primary" autoFocus>
|
||||
Close
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Modules;
|
||||
@@ -1,47 +0,0 @@
|
||||
import React, { Component } from 'react'
|
||||
import { connect } from 'react-redux'
|
||||
import { deletePost } from '../actions/postActions'
|
||||
|
||||
class Post extends Component {
|
||||
handleClick = () => {
|
||||
this.props.deletePost(this.props.post.id);
|
||||
this.props.history.push('/');
|
||||
}
|
||||
render() {
|
||||
|
||||
const post = this.props.post ? (
|
||||
<div className="post">
|
||||
<h4 className="center">{this.props.post.title}</h4>
|
||||
<p>{this.props.post.body}</p>
|
||||
<div className="center">
|
||||
<button className="btn grey" onClick={this.handleClick}>
|
||||
Delete Post
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<div className="center">Loading post...</div>
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="container">
|
||||
{post}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const mapStateToProps = (state, ownProps) => {
|
||||
let id = ownProps.match.params.post_id;
|
||||
return {
|
||||
post: state.posts.find(post => post.id === id)
|
||||
}
|
||||
}
|
||||
|
||||
const mapDispatchToProps = (dispatch) => {
|
||||
return {
|
||||
deletePost: (id) => dispatch(deletePost(id))
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(Post)
|
||||
@@ -1,21 +0,0 @@
|
||||
import NavBar from './navbar'
|
||||
import Footer from './footer'
|
||||
import Callback from './callback'
|
||||
import Home from './home'
|
||||
import About from './about'
|
||||
import Dashboard from './dashboard'
|
||||
import Teams from './teams'
|
||||
|
||||
import { theme, globalStyles } from './theme'
|
||||
|
||||
export {
|
||||
NavBar,
|
||||
Footer,
|
||||
Callback,
|
||||
Home,
|
||||
About,
|
||||
Dashboard,
|
||||
Teams,
|
||||
theme,
|
||||
globalStyles
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
import NavBar from './navbar'
|
||||
import Footer from './footer'
|
||||
import Callback from './callback'
|
||||
import Home from './home'
|
||||
import About from './about'
|
||||
import Dashboard from './dashboard'
|
||||
import Teams from './teams'
|
||||
|
||||
import { theme, globalStyles } from './theme'
|
||||
|
||||
export {
|
||||
NavBar,
|
||||
Footer,
|
||||
Callback,
|
||||
Home,
|
||||
About,
|
||||
Dashboard,
|
||||
Teams,
|
||||
theme,
|
||||
globalStyles
|
||||
}
|
||||
Reference in new issue
Block a user