Skip to content

Commit

Permalink
do not use 'store' in components; update button variant
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 9ea3945 commit a65f1ce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/app/(sidebar)/account/create/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function CreateAccount() {
</Text>
</div>
<div className="Account__CTA">
<Button size="md" variant="tertiary" onClick={generateKeypair}>
<Button size="md" variant="secondary" onClick={generateKeypair}>
Generate keypair
</Button>

Expand All @@ -54,7 +54,10 @@ export default function CreateAccount() {
</div>
</div>
<ExpandBox isExpanded={Boolean(account.publicKey && secretKey)}>
<GenerateKeypair secretKey={secretKey} />
<GenerateKeypair
publicKey={account.publicKey}
secretKey={secretKey}
/>
</ExpandBox>
</Card>
</div>
Expand Down
8 changes: 7 additions & 1 deletion src/components/GenerateKeypair.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { Icon, Input } from "@stellar/design-system";
import { useStore } from "@/store/useStore";

export const GenerateKeypair = ({ secretKey }: { secretKey: string }) => {
export const GenerateKeypair = ({
publicKey,
secretKey,
}: {
publicKey: string;
secretKey: string;
}) => {
const { account } = useStore();

return (
Expand Down

0 comments on commit a65f1ce

Please sign in to comment.