Skip to content

Commit

Permalink
test json data
Browse files Browse the repository at this point in the history
  • Loading branch information
nikos-koukis committed Oct 13, 2023
1 parent cdb25a9 commit a832f59
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/views/Home/components/NewUserForm/ViewWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ interface UserInfo {
interface ViewWalletProps {
userInfo: UserInfo;
isLoadingUserInfo: boolean;
jsonPrettyData: string;
}

const ViewWallet: React.FC<ViewWalletProps> = ({ userInfo, isLoadingUserInfo }) => {
const ViewWallet: React.FC<ViewWalletProps> = ({ userInfo, isLoadingUserInfo, jsonPrettyData }) => {

const parsedData = JSON.parse(jsonPrettyData);

return (
<div>
{isLoadingUserInfo ? (
Expand All @@ -20,6 +24,13 @@ const ViewWallet: React.FC<ViewWalletProps> = ({ userInfo, isLoadingUserInfo })
<h1>View Wallet</h1>
<p>Address: {userInfo.address}</p>
<p>Secret Words: {userInfo.secretWords.join(', ')}</p>
<div>
{Object.keys(parsedData).map(key => (
<div key={key}>
<strong>{key}:</strong> {parsedData[key]}
</div>
))}
</div>
</div>
)}
</div>
Expand Down

0 comments on commit a832f59

Please sign in to comment.