import React, { useState } from "react"; import { W3Wrapper } from "../W3Wrapper"; import { ComponentStory, ComponentMeta } from "@storybook/react"; import { useSavingsBalance, useSavingsStats } from "../../sdk/savings/react"; import { useEthers } from "@usedapp/core"; export interface PageProps { address?: string; firstName?: string; } const Web3Component = (params: PageProps) => { const stats = useSavingsStats(122); const accountStats = useSavingsBalance("never", 122); return (
        {Object.entries(stats?.stats || {}).map(_ => (
          
{_[0]}: {JSON.stringify(_[1])}
))}
        {Object.entries(accountStats || {}).map(_ => (
          
{_[0]}: {JSON.stringify(_[1])}
))}
); }; const Page = (params: PageProps) => ( ); export default { title: "Savings SDK hooks example", component: Page } as ComponentMeta; const Template: ComponentStory = args => ( ); export const SavingsSDKExample = Template.bind({});