Skip to content

Commit

Permalink
use the new component in view xdr too
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeesun Kim authored and Jeesun Kim committed Nov 8, 2024
1 parent 7165016 commit 893ba55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
17 changes: 4 additions & 13 deletions src/app/(sidebar)/xdr/view/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
Loader,
Button,
Icon,
CopyText,
} from "@stellar/design-system";
import { useQueryClient } from "@tanstack/react-query";
import { stringify } from "lossless-json";
Expand All @@ -24,6 +23,7 @@ import { XdrPicker } from "@/components/FormElements/XdrPicker";
import { XdrTypeSelect } from "@/components/XdrTypeSelect";
import { PrettyJsonTransaction } from "@/components/PrettyJsonTransaction";
import { TransactionHashReadOnlyField } from "@/components/TransactionHashReadOnlyField";
import { CopyJsonPayloadButton } from "@/components/CopyJsonPayloadButton";

import { parseToLosslessJson } from "@/helpers/parseToLosslessJson";
import { useIsXdrInit } from "@/hooks/useIsXdrInit";
Expand Down Expand Up @@ -180,18 +180,9 @@ export default function ViewXdr() {
</div>

<Box gap="md" direction="row" justify="end">
<CopyText
textToCopy={prettifyJsonString(xdrJsonDecoded.jsonString)}
>
<Button
size="md"
variant="tertiary"
icon={<Icon.Copy01 />}
iconPosition="left"
>
Copy JSON
</Button>
</CopyText>
<CopyJsonPayloadButton
jsonString={prettifyJsonString(xdrJsonDecoded.jsonString)}
/>
</Box>
</Box>
) : null}
Expand Down
1 change: 0 additions & 1 deletion src/components/CopyJsonPayloadButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export const CopyJsonPayloadButton = ({
}: {
jsonString: string;
}) => {
console.log("jsonString: ", jsonString);
return (
<CopyText textToCopy={jsonString}>
<Button
Expand Down

0 comments on commit 893ba55

Please sign in to comment.