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