1import * as need from 'lib/need';
2import { Button, ButtonProps } from '@tlon/indigo-react';
3import { useCallback } from 'react';
4import { useForm } from 'react-final-form';
5import { useWallet } from 'store/wallet';
7interface AddressButtonProps {
9 children?: React.ReactNode;
13export const AddressButton = ({
17}: AddressButtonProps) => {
18 const { change, focus } = useForm();
19 const { wallet }: any = useWallet();
20 const address = need.addressFromWallet(wallet);
22 const onClick = useCallback(
23 (event: React.MouseEvent<HTMLSpanElement>) => {
24 event.stopPropagation();
25 change(inputName, address);
28 [address, change, focus, inputName]
32 <Button onClick={onClick} {...rest} className={'secondary'} type="button">
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list