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 {
8 children?: React.ReactNode;
12export const AddressButton = ({ children, ...rest }: AddressButtonProps) => {
13 const { change } = useForm();
14 const { wallet }: any = useWallet();
15 const address = need.addressFromWallet(wallet);
17 const onClick = useCallback(
18 (_event: React.MouseEvent<HTMLSpanElement>) => {
19 change('owner', address);
25 <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