Skip to content

Commit

Permalink
organize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
kangarang committed Aug 11, 2018
1 parent 4560984 commit 6b70ecb
Show file tree
Hide file tree
Showing 17 changed files with 170 additions and 178 deletions.
4 changes: 3 additions & 1 deletion src/containers/Transactions/Apply.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ import { MarginDiv } from 'components/StyledHome'
import Button from 'components/Button'
import Text from 'components/Text'

import { SideText, SideTextInput } from './components'
import SidePanelSeparator from './components/SidePanelSeparator'
import SideTextInput from './components/SideTextInput'
import TotalAmount from './components/TotalAmount'
import SidePanel from './components/SidePanel'
import SideText from './components/SideText'

import { TransactionsContext } from './index'

export default class Apply extends React.Component {
Expand Down
9 changes: 5 additions & 4 deletions src/containers/Transactions/Challenge.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import React from 'react'
import translate from 'translations'

import { MarginDiv } from 'components/StyledHome'
import Button from 'components/Button'
import Countdown from 'components/Countdown'
import Button from 'components/Button'

import SidePanel from './components/SidePanel'
import { SideText } from './components'
import TotalAmount from './components/TotalAmount'
import SidePanelSeparator from './components/SidePanelSeparator'
import TotalAmount from './components/TotalAmount'
import SidePanel from './components/SidePanel'
import SideText from './components/SideText'

import { TransactionsContext } from './index'

export default class Challenge extends React.Component {
Expand Down
11 changes: 1 addition & 10 deletions src/containers/Transactions/ClaimReward.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,7 @@ class ClaimReward extends Component {
render() {
return (
<TransactionsContext.Consumer>
{({
selectedOne,
opened,
closeTxPanel,
handleFileInput,
handleClaimReward,
account,
voting,
registry,
}) => (
{({ opened, closeTxPanel, handleFileInput, handleClaimReward }) => (
<SidePanel
title="Claim Reward"
opened={opened === 'claimReward'}
Expand Down
6 changes: 4 additions & 2 deletions src/containers/Transactions/CommitVote.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import React, { Component } from 'react'
import styled from 'styled-components'

import Radio from 'components/Radio'
import Img from 'components/Img'

import SidePanelSeparator from './components/SidePanelSeparator'
import SidePanel from './components/SidePanel'
import DetailsSection from './components/DetailsSection'
import Radio from 'components/Radio'
import SidePanel from './components/SidePanel'
import { TransactionsContext } from './index'

import leftArrowIcon from 'assets/icons/left-arrow.svg'
// import rightArrowIcon from 'assets/icons/right-arrow-thin.svg'

// import thumbsUpIcon from 'assets/icons/thumbs-up.svg'
import thumbsDownIcon from 'assets/icons/thumbs-down.svg'

import likeIcon from 'assets/icons/like.svg'
// import dislikeIcon from 'assets/icons/dislike.svg'

Expand Down
11 changes: 6 additions & 5 deletions src/containers/Transactions/RevealVote.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import React, { Component } from 'react'

import Button from 'components/Button'
import { MarginDiv } from 'components/StyledHome'
import Button from 'components/Button'

import { SideSplit, SideText } from 'containers/Transactions/components'
import SidePanelSeparator from './components/SidePanelSeparator'
import DetailsSection from './components/DetailsSection'
import SidePanel from './components/SidePanel'
import SideSplit from './components/SideSplit'
import SideText from './components/SideText'

import { baseToConvertedUnit } from 'libs/units'
import { getLocal } from 'utils/_localStorage'

import { TransactionsContext } from './index'
import SidePanelSeparator from './components/SidePanelSeparator'
import SidePanel from './components/SidePanel'
import DetailsSection from './components/DetailsSection'

export default class RevealVote extends Component {
state = {
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Transactions/Transfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { colors } from 'global-styles'
import { MarginDiv } from 'components/StyledHome'
import Button from 'components/Button'

import { SideText, SideTextInput } from './components'
import SidePanelSeparator from './components/SidePanelSeparator'
import { SideText, SideTextInput } from './components'
import SidePanel from './components/SidePanel'

import { TransactionsContext } from './index'
Expand Down
4 changes: 2 additions & 2 deletions src/containers/Transactions/UpdateStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import React, { Component } from 'react'
import translate from 'translations'

import { MarginDiv } from 'components/StyledHome'
import Button from 'components/Button'
import { baseToConvertedUnit } from 'libs/units'
import Button from 'components/Button'

import { SideSplit, SideText } from 'containers/Transactions/components'
import SidePanel from './components/SidePanel'
import SidePanelSeparator from './components/SidePanelSeparator'
import SidePanel from './components/SidePanel'
import { TransactionsContext } from './index'

export default class UpdateStatus extends Component {
Expand Down
8 changes: 4 additions & 4 deletions src/containers/Transactions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { connect } from 'react-redux'
import { compose } from 'redux'
import { createStructuredSelector } from 'reselect'

import { selectBalances, selectTCR, selectParameters } from 'modules/home/selectors'
import { selectTxPanelListing, selectTxPanelMethod } from 'modules/transactions/selectors'
import * as actions from 'modules/transactions/actions'
import { selectTxPanelListing, selectTxPanelMethod } from 'modules/transactions/selectors'
import { selectBalances, selectTCR, selectParameters } from 'modules/home/selectors'

import { BN, baseToConvertedUnit } from 'libs/units'

Expand All @@ -15,8 +15,8 @@ import Transfer from 'containers/Transactions/Transfer'
import Challenge from 'containers/Transactions/Challenge'
import CommitVote from 'containers/Transactions/CommitVote'
import RevealVote from 'containers/Transactions/RevealVote'
import UpdateStatus from 'containers/Transactions/UpdateStatus'
import ClaimReward from 'containers/Transactions/ClaimReward'
import UpdateStatus from 'containers/Transactions/UpdateStatus'

export const TransactionsContext = React.createContext()

Expand All @@ -34,7 +34,7 @@ class TransactionsProvider extends Component {
render() {
const {
tcr,
children,
// children,
balances,
parameters,
txPanelListing,
Expand Down
3 changes: 1 addition & 2 deletions src/modules/home/sagas/contracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { selectABIs, selectAccount } from '../selectors'

import * as actions from '../actions'
import * as types from '../types'
import * as liActions from 'modules/listings/actions'

import { getEthjs } from 'libs/provider'
import { ipfsGetData } from 'libs/ipfs'
Expand Down Expand Up @@ -50,7 +49,7 @@ function* abisSaga(action) {

function* registrySaga(action) {
try {
yield put(liActions.setListings({}))
// yield put(liActions.setAllListings({}))
const abis = yield select(selectABIs)
const account = yield select(selectAccount)

Expand Down
2 changes: 1 addition & 1 deletion src/modules/home/sagas/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { call, fork, put, takeLatest } from 'redux-saga/effects'
import { call, put, takeLatest } from 'redux-saga/effects'

import * as actions from '../actions'
import * as types from '../types'
Expand Down
10 changes: 5 additions & 5 deletions src/modules/listings/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ const updateOneListing = listing => ({
listing,
})

const setListings = (listings, byID) => ({
type: types.SET_LISTINGS,
const setAllListings = (listings, byID) => ({
type: types.SET_ALL_LISTINGS,
listings,
byID,
})

const deleteKey = key => ({
type: types.DELETE_KEY,
const deleteOneListing = key => ({
type: types.DELETE_ONE_LISTING,
key,
})

export { updateOneListing, setListings, deleteKey }
export { updateOneListing, setAllListings, deleteOneListing }
2 changes: 1 addition & 1 deletion src/modules/listings/reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const initialState = fromJS({

function listingsReducer(state = initialState, action) {
switch (action.type) {
case types.SET_LISTINGS:
case types.SET_ALL_LISTINGS:
return state
.set('listings', fromJS(action.listings))
.set('byID', fromJS(action.byID))
Expand Down
136 changes: 0 additions & 136 deletions src/modules/listings/sagas.js

This file was deleted.

Loading

0 comments on commit 6b70ecb

Please sign in to comment.