Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

fix: open edit wallet nickname modal #2465

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ import { WalletAddressesV2 } from "app/types";
export type EditNicknameModalProps = {
editingWallet?: WalletAddressesV2;
onClose: any;
visible: boolean;
};
export const EditNicknameModal = ({
editingWallet,
onClose,
visible = false,
}: EditNicknameModalProps) => {
const [nickname, setNickname] = useState("");
const { editWalletNickName } = useAddWalletNickname();
Expand All @@ -34,9 +36,13 @@ export const EditNicknameModal = ({
AvoidSoftInput.setEnabled(true);
};
}, [editingWallet?.nickname]);

return (
<Modal tw="bottom-16 md:bottom-0" onClose={onClose} title="Edit Nickname">
<Modal
tw="bottom-16 md:bottom-0"
onClose={onClose}
visible={visible}
title="Edit Nickname"
>
<View tw="p-4">
<Fieldset
placeholder="rainbow wallet"
Expand Down
11 changes: 5 additions & 6 deletions packages/app/components/settings/setting.md.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,11 @@ export const SettingsMd = () => {
</View>

<View style={{ height: bottomHeight }} />
{editingWallet ? (
<EditNicknameModal
editingWallet={editingWallet}
onClose={() => setEditingWallet(undefined)}
/>
) : null}
<EditNicknameModal
editingWallet={editingWallet}
visible={!!editingWallet}
onClose={() => setEditingWallet(undefined)}
/>
</View>
);
};
2 changes: 1 addition & 1 deletion packages/design-system/modal/modal.container.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const ModalContainerComponent = forwardRef<ModalMethods, ModalContainerProps>(
disableBackdropPress,
tw: propTw = "",
headerShown = true,
visible,
visible = false,
closeButtonProps,
}: ModalContainerProps,
ref
Expand Down
Loading