diff --git a/dapp/src/components/Modals/StakingOverviewModal.tsx b/dapp/src/components/Modals/Staking/Overview.tsx similarity index 67% rename from dapp/src/components/Modals/StakingOverviewModal.tsx rename to dapp/src/components/Modals/Staking/Overview.tsx index 84a5420d4..2ad8a1e94 100644 --- a/dapp/src/components/Modals/StakingOverviewModal.tsx +++ b/dapp/src/components/Modals/Staking/Overview.tsx @@ -1,9 +1,9 @@ import React from "react" import { Button, ModalBody, ModalFooter } from "@chakra-ui/react" -import { ModalStep } from "../../contexts" -import { TextMd } from "../shared/Typography" +import { ModalStep } from "../../../contexts" +import { TextMd } from "../../shared/Typography" -export default function StakingOverviewModal({ goNext }: ModalStep) { +export default function Overview({ goNext }: ModalStep) { return ( <> diff --git a/dapp/src/components/Modals/StakeModal.tsx b/dapp/src/components/Modals/Staking/StakeForm.tsx similarity index 75% rename from dapp/src/components/Modals/StakeModal.tsx rename to dapp/src/components/Modals/Staking/StakeForm.tsx index f014a037c..8d308ecff 100644 --- a/dapp/src/components/Modals/StakeModal.tsx +++ b/dapp/src/components/Modals/Staking/StakeForm.tsx @@ -1,7 +1,7 @@ import React from "react" import { Button, ModalBody } from "@chakra-ui/react" -import { ModalStep } from "../../contexts" -import { TextMd } from "../shared/Typography" +import { ModalStep } from "../../../contexts" +import { TextMd } from "../../shared/Typography" export default function StakeModal({ goNext }: ModalStep) { return ( diff --git a/dapp/src/components/Modals/Staking/index.tsx b/dapp/src/components/Modals/Staking/index.tsx new file mode 100644 index 000000000..451a90750 --- /dev/null +++ b/dapp/src/components/Modals/Staking/index.tsx @@ -0,0 +1,32 @@ +import React from "react" +import { useModalFlowContext } from "../../../hooks" +import StakeForm from "./StakeForm" +import Overview from "./Overview" +import ModalBase from "../../shared/ModalBase" + +function StakingSteps() { + const { activeStep, goNext } = useModalFlowContext() + + switch (activeStep) { + case 1: + return + case 2: + return + default: + return null + } +} + +export default function Staking({ + isOpen, + onClose, +}: { + isOpen: boolean + onClose: () => void +}) { + return ( + + + + ) +} diff --git a/dapp/src/components/Overview/PositionDetails.tsx b/dapp/src/components/Overview/PositionDetails.tsx index 9bece8e22..06c4f0324 100644 --- a/dapp/src/components/Overview/PositionDetails.tsx +++ b/dapp/src/components/Overview/PositionDetails.tsx @@ -13,7 +13,7 @@ import { } from "@chakra-ui/react" import { BITCOIN, USD } from "../../constants" import { Info } from "../../static/icons" -import StakingModal from "../StakingModal" +import Staking from "../Modals/Staking" export default function PositionDetails(props: CardProps) { const [isOpenStakingModal, stakingModal] = useBoolean() @@ -44,7 +44,7 @@ export default function PositionDetails(props: CardProps) { Unstake - + ) } diff --git a/dapp/src/components/StakingModal/index.tsx b/dapp/src/components/StakingModal/index.tsx deleted file mode 100644 index a404f3623..000000000 --- a/dapp/src/components/StakingModal/index.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from "react" -import { useModalFlowContext } from "../../hooks" -import StakeModal from "../Modals/StakeModal" -import StakingOverviewModal from "../Modals/StakingOverviewModal" -import ModalBase from "../shared/ModalBase" - -function StakingModalSteps() { - const { activeStep, goNext } = useModalFlowContext() - - switch (activeStep) { - case 1: - return - case 2: - return - default: - return null - } -} - -export default function StakingModal({ - isOpen, - onClose, -}: { - isOpen: boolean - onClose: () => void -}) { - return ( - - - - ) -}