Skip to content

Commit

Permalink
feat: address in search param
Browse files Browse the repository at this point in the history
  • Loading branch information
yongenaelf committed Nov 13, 2024
1 parent 6d9a71c commit 61f867f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Binary file modified bun.lockb
Binary file not shown.
6 changes: 5 additions & 1 deletion src/components/app/faucet-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,14 @@ const formSchema = z.object({
});

export function FaucetForm() {
// get address from search param
const urlParams = new URLSearchParams(window.location.search);
const address = urlParams.get("address") || "";

const form = useForm<z.infer<typeof formSchema>>({
resolver: zodResolver(formSchema),
defaultValues: {
address: "",
address,
choice: EChoices.ELF,
},
});
Expand Down

0 comments on commit 61f867f

Please sign in to comment.