From 5a02cbfc9a6ec0405038d03ce01273ea64704bc7 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Fri, 22 May 2020 17:19:35 -0300 Subject: [PATCH] fix: remove old `index.jsx` file --- src/routes/safe/container/index.jsx | 76 ----------------------------- 1 file changed, 76 deletions(-) delete mode 100644 src/routes/safe/container/index.jsx diff --git a/src/routes/safe/container/index.jsx b/src/routes/safe/container/index.jsx deleted file mode 100644 index 927aff1c..00000000 --- a/src/routes/safe/container/index.jsx +++ /dev/null @@ -1,76 +0,0 @@ -import * as React from 'react' -import { useState } from 'react' -import { useSelector } from 'react-redux' - -import Page from 'src/components/layout/Page' - -import Layout from 'src/routes/safe/components/Layout' -import { useCheckForUpdates } from 'src/routes/safe/container/Hooks/useCheckForUpdates' -import { useLoadSafe } from 'src/routes/safe/container/Hooks/useLoadSafe' -import { safeParamAddressFromStateSelector } from 'src/routes/safe/store/selectors' - -const INITIAL_STATE = { - sendFunds: { - isOpen: false, - selectedToken: undefined, - }, - showReceive: false, -} - -const SafeView = () => { - const [state, setState] = useState(INITIAL_STATE) - const safeAddress = useSelector(safeParamAddressFromStateSelector) - - useLoadSafe(safeAddress) - useCheckForUpdates() - - const onShow = (action) => () => { - setState((prevState) => ({ - ...prevState, - [`show${action}`]: true, - })) - } - - const onHide = (action) => () => { - setState((prevState) => ({ - ...prevState, - [`show${action}`]: false, - })) - } - - const showSendFunds = (token) => { - setState((prevState) => ({ - ...prevState, - sendFunds: { - isOpen: true, - selectedToken: token, - }, - })) - } - - const hideSendFunds = () => { - setState((prevState) => ({ - ...prevState, - sendFunds: { - isOpen: false, - selectedToken: undefined, - }, - })) - } - const { sendFunds, showReceive } = state - - return ( - - - - ) -} - -export default SafeView