diff --git a/client/src/App.js b/client/src/App.js index 81566dd..f3b996a 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -1,7 +1,6 @@ import React, { useEffect, useState } from 'react'; import './App.css'; import { Navbar, Dropdown, Icon } from 'react-materialize'; -import MakeMoneyMove from './cash/MakeMoneyMove'; import Flow from "./homies/Flow"; import Cash from './cash/Cash'; import Homies from './homies/Homies'; @@ -11,15 +10,16 @@ import axios from 'axios'; import { CRIB, GANGS, - MAKE_MONEY_MOVE, HOMIE_FLOW, HOMIES, + HOMIE_MOVE_MONEY, PUT_IN_WORK } from './RouteNames'; import PutInWork from "./cash/PutInWork"; import GangOnboarding from "./gangOnboarding/GangOnboarding"; import Gangs from './gangs/Gangs'; import {errorToast} from "./common/errorHelpers"; +import MoveMoney from "./homies/MoveMoney"; const App = (props) => { @@ -50,7 +50,7 @@ const App = (props) => { } />, } />, } />, - } />, + } />, } /> ] ); @@ -117,10 +117,6 @@ const App = (props) => { Homies - - Make Money Move - - Put in Work diff --git a/client/src/RouteNames.js b/client/src/RouteNames.js index 98ccb73..756433d 100644 --- a/client/src/RouteNames.js +++ b/client/src/RouteNames.js @@ -1,6 +1,6 @@ export const CRIB = '/'; export const HOMIES = '/homies'; -export const MAKE_MONEY_MOVE = '/make-money-move'; +export const HOMIE_MOVE_MONEY = '/homie/:homie_id/move-money'; export const PUT_IN_WORK = '/put-in-work'; export const HOMIE_FLOW = '/homie/:homie_id/flow'; export const GANGS = '/gangs'; diff --git a/client/src/cash/Cash.js b/client/src/cash/Cash.js index 1299603..58cc5bd 100644 --- a/client/src/cash/Cash.js +++ b/client/src/cash/Cash.js @@ -1,8 +1,7 @@ import React, { useState, useEffect } from 'react'; -import { Button, Table } from 'react-materialize'; +import { Button, Icon, Table } from 'react-materialize'; import './Cash.css'; import axios from 'axios'; -import { MAKE_MONEY_MOVE } from '../RouteNames'; import { withRouter } from 'react-router-dom'; import { formatMoney, formatTime } from '../common/formatting'; import RoutableNavItem from "../common/RoutableNavItem"; @@ -21,7 +20,7 @@ const Cash = (props) => { } }; getCashForHomies(); - }, []); + }, [gang]); const cashTableBody = homiesCash.map( (homieLine) => { return ( @@ -35,7 +34,13 @@ const Cash = (props) => { { formatMoney(homieLine.amount, gang) } - + + + + ); @@ -52,10 +57,10 @@ const Cash = (props) => { Work - + Cash - + Actions @@ -64,24 +69,8 @@ const Cash = (props) => { { cashTableBody } - -