import { Callback, NLView } from "../types"; import { Col, Row } from "antd"; import { MoodReadResponse } from "@newstackdev/iosdk-newgraph-client-js"; import { useAppState } from "../overmind"; import { useCachedNewconAccountHistory } from "../hooks/useCached"; export interface Total { quantity: string; contract: string; } export interface StakeInfo { id: number; code: string; owner: string; description: string; total: Total; creation_date: Date; last_update_date: Date; } export const StakeControl: NLView<{ stakeInfo: StakeInfo }> = ({ stakeInfo }) => { return ( <> {stakeInfo.owner} {stakeInfo.total.quantity} {/* {stakeInfo.total.contract} */} ); }; export const UserHistoryControl: NLView<{ user: { username?: string } }> = ({ user }) => { const history = useCachedNewconAccountHistory(user); return ( <> Hist{" "} {history?.actions?.map((h) => (
{JSON.stringify(h, null, "\t")}
))} ); }; export const NewcoinWidget: NLView<{ user: { username?: string } }> = ({ user: { username } }) => { const state = useAppState(); return ( <> Account: {JSON.stringify(state.newcoin.account)}

Pools

{JSON.stringify(state.newcoin?.cache.pools)} {/* {state.newcoin?.pool?.rows?.map((stakeInfo: StakeInfo) => )} */} ); };