-
Notifications
You must be signed in to change notification settings - Fork 333
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
1 parent
917c122
commit 76b5ab2
Showing
5 changed files
with
17 additions
and
80 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@ledgerhq/types-live": patch | ||
"ledger-live-desktop": patch | ||
"@ledgerhq/live-common": patch | ||
--- | ||
|
||
Remove LLD objkt feature flag because we don't support the webview anymore |
70 changes: 6 additions & 64 deletions
70
apps/ledger-live-desktop/src/renderer/families/tezos/AccountBodyHeader/index.tsx
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,73 +1,15 @@ | ||
import React, { useCallback } from "react"; | ||
import React from "react"; | ||
import Delegation from "../Delegation"; | ||
import Box from "~/renderer/components/Box"; | ||
import Card from "~/renderer/components/Box/Card"; | ||
import { useTranslation } from "react-i18next"; | ||
import { useHistory } from "react-router-dom"; | ||
import Text from "~/renderer/components/Text"; | ||
import styled from "styled-components"; | ||
import { SubAccount } from "@ledgerhq/types-live"; | ||
import Label from "~/renderer/components/Label"; | ||
import Button from "~/renderer/components/ButtonV3"; | ||
import { FeatureToggle } from "@ledgerhq/live-common/featureFlags/index"; | ||
import { TezosAccount } from "@ledgerhq/live-common/families/tezos/types"; | ||
|
||
type Props = { | ||
account: TezosAccount | SubAccount; | ||
parentAccount: TezosAccount | undefined | null; | ||
}; | ||
const Wrapper = styled(Box).attrs(() => ({ | ||
p: 4, | ||
}))` | ||
border-radius: 4px; | ||
justify-content: space-between; | ||
align-items: center; | ||
`; | ||
const TableContainer = styled(Card)` | ||
border-radius: 4px; | ||
overflow: hidden; | ||
`; | ||
const AccountBodyHeader = ({ account, parentAccount }: Props) => { | ||
const history = useHistory(); | ||
const { t } = useTranslation(); | ||
const onNFTClick = useCallback(() => { | ||
const pathname = `/platform/objkt`; | ||
history.push({ | ||
pathname, | ||
state: { | ||
accountId: account.id, | ||
}, | ||
}); | ||
}, [history, account.id]); | ||
return ( | ||
<> | ||
<FeatureToggle featureId="objkt"> | ||
<TableContainer mb={6}> | ||
<Wrapper horizontal> | ||
<Box | ||
style={{ | ||
maxWidth: "65%", | ||
}} | ||
> | ||
<Text ff="Inter|Bold" color="palette.text.shade100" fontSize={4}> | ||
{t("tezos.objkt.card.title")} | ||
</Text> | ||
<Box mt={2}> | ||
<Label fontSize={4}>{t("tezos.objkt.card.description")}</Label> | ||
</Box> | ||
</Box> | ||
<Box> | ||
<Button variant="color" onClick={onNFTClick}> | ||
<Box horizontal flow={1} alignItems="center"> | ||
<Box>{t("tezos.objkt.card.cta")}</Box> | ||
</Box> | ||
</Button> | ||
</Box> | ||
</Wrapper> | ||
</TableContainer> | ||
</FeatureToggle> | ||
<Delegation account={account} parentAccount={parentAccount} /> | ||
</> | ||
); | ||
}; | ||
|
||
const AccountBodyHeader = ({ account, parentAccount }: Props) => ( | ||
<Delegation account={account} parentAccount={parentAccount} /> | ||
); | ||
|
||
export default AccountBodyHeader; |
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