forked from austintgriffith/burner-wallet
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
104 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,29 @@ | ||
import React from "react"; | ||
import { Flex, Icon, Box } from "rimble-ui"; | ||
import { Translation } from "react-i18next"; | ||
import { withTranslation } from "react-i18next"; | ||
import { PrimaryButton } from "./Buttons"; | ||
|
||
export default ({ changeView }) => { | ||
let sendButtons = ( | ||
<Translation> | ||
{(t, { i18n }) => ( | ||
// eslint-disable-next-line no-unused-expressions | ||
<Box> | ||
<Flex mx={-2}> | ||
<Box width={[1, 1 / 2, 1 / 2]} m={2}> | ||
<PrimaryButton width={1} onClick={() => changeView("receive")}> | ||
<Flex alignItems="center"> | ||
<Icon name="CenterFocusWeak" mr={2} /> | ||
{t("main_card.receive")} | ||
</Flex> | ||
</PrimaryButton> | ||
</Box> | ||
<Box width={[1, 1 / 2, 1 / 2]} m={2}> | ||
<PrimaryButton | ||
width={1} | ||
onClick={() => changeView("send_to_address")} | ||
> | ||
<Flex alignItems="center"> | ||
<Icon name="Send" mr={2} /> | ||
{t("main_card.send")} | ||
</Flex> | ||
</PrimaryButton> | ||
</Box> | ||
const MainCard = ({ changeView, t }) => ( | ||
<Box> | ||
<Flex mx={-2}> | ||
<Box width={[1, 1 / 2, 1 / 2]} m={2}> | ||
<PrimaryButton width={1} onClick={() => changeView("receive")}> | ||
<Flex alignItems="center"> | ||
<Icon name="CenterFocusWeak" mr={2} /> | ||
{t("main_card.receive")} | ||
</Flex> | ||
</Box> | ||
)} | ||
</Translation> | ||
); | ||
</PrimaryButton> | ||
</Box> | ||
<Box width={[1, 1 / 2, 1 / 2]} m={2}> | ||
<PrimaryButton width={1} onClick={() => changeView("send_to_address")}> | ||
<Flex alignItems="center"> | ||
<Icon name="Send" mr={2} /> | ||
{t("main_card.send")} | ||
</Flex> | ||
</PrimaryButton> | ||
</Box> | ||
</Flex> | ||
</Box> | ||
); | ||
|
||
return sendButtons; | ||
}; | ||
export default withTranslation()(MainCard); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.