Skip to content

Commit

Permalink
Merge pull request #105 from jrs-innovation-center/82-remove-unused-vars
Browse files Browse the repository at this point in the history
removing all the unused things
  • Loading branch information
tripott authored Dec 1, 2017
2 parents 68e37f3 + c76fbce commit 7ce1b43
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 63 deletions.
6 changes: 2 additions & 4 deletions app/src/components/category-card.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import React from 'react'
import PropTypes from 'prop-types'

import { withStyles } from 'material-ui/styles'
import Card, { CardActions, CardContent, CardHeader } from 'material-ui/Card'
import Card, { CardContent, CardHeader } from 'material-ui/Card'
import Avatar from 'material-ui/Avatar'
import Button from 'material-ui/Button'
import Typography from 'material-ui/Typography'

import InboxIcon from 'material-ui-icons/Inbox'
import Icon from 'material-ui/Icon'

import withRoot from '../components/withRoot'
Expand Down
3 changes: 0 additions & 3 deletions app/src/components/category-item.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react'
import { Link } from 'react-router-dom'
import {
ListItem,
ListItemAvatar,
Expand All @@ -8,8 +7,6 @@ import {
} from 'material-ui/List'
import Avatar from 'material-ui/Avatar'
import IconButton from 'material-ui/IconButton'

import EllipsisIcon from 'material-ui-icons/MoreVert'
import Divider from 'material-ui/Divider'
import Icon from 'material-ui/Icon'
import CategoryMenu from './category-item-menu'
Expand Down
2 changes: 0 additions & 2 deletions app/src/components/category-resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { Link } from 'react-router-dom'
import Avatar from 'material-ui/Avatar'
import List, { ListItem, ListItemText, ListItemAvatar } from 'material-ui/List'
import {
not,
isNil,
slice,
toUpper,
contains,
Expand Down
2 changes: 1 addition & 1 deletion app/src/components/resource-edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Select from 'material-ui/Select'
import TextField from 'material-ui/TextField'
import Button from 'material-ui/Button'
import SaveIcon from 'material-ui-icons/Save'
import { assoc, isEmpty, map, reduce } from 'ramda'
import { map } from 'ramda'

const styles = theme => ({
input: {
Expand Down
2 changes: 1 addition & 1 deletion app/src/components/resource-item-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ResourceMenuItem extends React.Component {
onClick={event => {
event.stopPropagation()
window.open('tel:' + this.props.phone)
this.handleRequestClose
this.handleRequestClose()
}}
>
CALL
Expand Down
8 changes: 3 additions & 5 deletions app/src/components/resource-item.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import React from 'react'
import { withRouter } from 'react-router-dom'

import { ListItem, ListItemAvatar, ListItemText } from 'material-ui/List'
import Avatar from 'material-ui/Avatar'
import IconButton from 'material-ui/IconButton'

import Divider from 'material-ui/Divider'
import ResourceMenuItem from './resource-item-menu'
import { withRouter } from 'react-router-dom'

import {
not,
isNil,
slice,
toUpper,
contains,
Expand Down
79 changes: 37 additions & 42 deletions app/src/pages/categories/show.js
Original file line number Diff line number Diff line change
@@ -1,58 +1,56 @@
import React from 'react'

import red from 'material-ui/colors/red'

//import Chevron_left from " material-ui-icons/Chevron_left";
import { filter, propEq } from 'ramda'
import withRoot from '../../components/withRoot'
import withDrawer from '../../components/withDrawer'
import MenuAppBar from '../../components/menuAppBar'
import { connect } from 'react-redux'
import {
setCurrentCategory,
deleteCategory
} from '../../action-creators/categories'
import { prop, path, split, compose, last } from 'ramda'
import { setResources } from '../../action-creators/resources'
import { CONFIRM_CATEGORY_DELETE, DENY_CATEGORY_DELETE } from '../../constants'
import { Link } from 'react-router-dom'

import withRoot from '../../components/withRoot'
import withDrawer from '../../components/withDrawer'
import MenuAppBar from '../../components/menuAppBar'
import SecondaryMenu from '../../components/secondaryMenu'
import CategoryCard from '../../components/category-card'
import DenyDeleteDialog from '../../components/deny-category-dialog'
import CategoryResources from '../../components/category-resources'

import { getURLPathID } from '../../lib/url-path-helper'
import Button from 'material-ui/Button'
import EditIcon from 'material-ui-icons/ModeEdit'
import { Link } from 'react-router-dom'
import SecondaryMenu from '../../components/secondaryMenu'
import { CONFIRM_CATEGORY_DELETE, DENY_CATEGORY_DELETE } from '../../constants'
import Dialog, {
DialogActions,
DialogContent,
DialogContentText,
DialogTitle
} from 'material-ui/Dialog'
import DenyDeleteDialog from '../../components/deny-category-dialog'
import CategoryResources from '../../components/category-resources'
import { setResources } from '../../action-creators/resources'

const styles = theme => ({
card: {
maxWidth: 400
},
media: {
height: 194
},
expand: {
transform: 'rotate(0deg)',
transition: theme.transitions.create('transform', {
duration: theme.transitions.duration.shortest
})
},
expandOpen: {
transform: 'rotate(180deg)'
},
avatar: {
backgroundColor: red[500]
},
flexGrow: {
flex: '1 1 auto'
}
})
import { prop, path, split, compose, last, filter, propEq } from 'ramda'

// const styles = theme => ({
// card: {
// maxWidth: 400
// },
// media: {
// height: 194
// },
// expand: {
// transform: 'rotate(0deg)',
// transition: theme.transitions.create('transform', {
// duration: theme.transitions.duration.shortest
// })
// },
// expandOpen: {
// transform: 'rotate(180deg)'
// },
// avatar: {
// backgroundColor: red[500]
// },
// flexGrow: {
// flex: '1 1 auto'
// }
// })

class ShowCategory extends React.Component {
state = { expanded: false }
Expand All @@ -71,8 +69,6 @@ class ShowCategory extends React.Component {

render() {
const currentID = getURLPathID(this.props)
// const { category } = this.props

const menuItemActions = [
{
name: 'Edit',
Expand Down Expand Up @@ -128,8 +124,7 @@ class ShowCategory extends React.Component {
</Button>
<Button
onClick={() =>
this.props.deleteCategory(this.props.currentCategory._id)
}
this.props.deleteCategory(this.props.currentCategory._id)}
color="primary"
autoFocus
>
Expand Down
2 changes: 0 additions & 2 deletions app/src/pages/resources/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import withDrawer from '../../components/withDrawer'
import MenuAppBar from '../../components/menuAppBar'
import EditResourceForm from '../../components/resource-edit'
import { connect } from 'react-redux'
import { map, pathOr } from 'ramda'
import {
updateEditForm,
addEditResource,
setEditResource,
isActive,
Expand Down
4 changes: 1 addition & 3 deletions app/src/pages/resources/show.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
import ResourceCard from '../../components/resource-card'
import Button from 'material-ui/Button'
import PhoneIcon from 'material-ui-icons/Phone'
import { Link } from 'react-router-dom'
import SecondaryMenu from '../../components/secondaryMenu'
import Dialog, {
DialogActions,
Expand Down Expand Up @@ -91,8 +90,7 @@ class ShowResource extends React.Component {
</Button>
<Button
onClick={() =>
this.props.deleteResource(this.props.currentResource._id)
}
this.props.deleteResource(this.props.currentResource._id)}
color="primary"
autoFocus
>
Expand Down

0 comments on commit 7ce1b43

Please sign in to comment.