import React from "react" import {AnyAction} from "redux" import styles from "./WalletInfo.pcss" import {WpUploadMedia} from "spotlight/admin-common/components/Wp/WpUploadMedia" import wp from "spotlight/admin-common/libs/wp" import {Button, ButtonSize, ButtonType} from "spotlight/admin-common/components/Button" import {useDispatch, useSelector} from "react-redux" import {ThunkDispatch} from "@reduxjs/toolkit" import {selectWallet} from "spotlight/admin-common/stores/wallets/selectors" import {Wallets} from "spotlight/common/modules/wallets" interface Props { address: string; onUpdate?: () => void; } export default function WalletInfo({address, onUpdate}: Props) { const dispatch = useDispatch>(); const wallet = useSelector(selectWallet(address)); const [isSaving, setIsSaving] = React.useState(false); const updatePic = async (url: string) => { // setIsSaving(true); // // const newAccount = withPartial(wallet, {customProfilePicUrl: url}); // await dispatch(updateAccount(newAccount)); // // setIsSaving(false); // onUpdate && onUpdate(); }; const handleChangePic = (attachments: wp.media.Attachment[]) => { // const id = parseInt(attachments[0].attributes.id); // const url = wp.media.attachment(id).attributes.url; // // updatePic(url); }; const handleResetPic = () => { // updatePic(""); }; return (
{/* USERNAME */} {wallet.name}
Address: {wallet.address}
{/* RIGHT COLUMN */}
{/* */}
{({open}) => ( )} {/* wallet.customProfilePicUrl.length > 0 && ( Reset profile picture ) */ }
); }