Skip to content

Commit

Permalink
add 'Fund account with Friendbot'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeesun Kim authored and Jeesun Kim committed Mar 14, 2024
1 parent 023d01d commit 20fc7cf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/app/(sidebar)/account/create/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
"use client";

import { Card, Link, Text, Button, Icon } from "@stellar/design-system";
import { useRouter } from "next/navigation";
import { Card, Text, Button } from "@stellar/design-system";

import { GenerateKeypair } from "@/components/GenerateKeypair";
import { Routes } from "@/constants/routes";

import "../styles.scss";

export default function CreateAccount() {
const router = useRouter();

return (
<div className="Account">
<Card>
Expand All @@ -24,6 +27,14 @@ export default function CreateAccount() {
</div>
<div className="Account__CTA">
<GenerateKeypair />

<Button
size="md"
variant="tertiary"
onClick={() => router.push(Routes.ACCOUNT_FUND)}
>
Fund account with Friendbot
</Button>
</div>
</div>
</Card>
Expand Down
4 changes: 4 additions & 0 deletions src/app/(sidebar)/account/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
align-self: flex-start;
}

&__CTA {
display: flex;
gap: pxToRem(18px);
}
&__keypair {
display: flex;
align-items: flex-start;
Expand Down
1 change: 1 addition & 0 deletions src/components/GenerateKeypair.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const GenerateKeypair = () => {
}
/>
)}

{account.keypair.secretKey && (
<Input
readOnly
Expand Down

0 comments on commit 20fc7cf

Please sign in to comment.