Skip to content

Commit

Permalink
try to type some things
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed Jun 30, 2023
1 parent f1d3693 commit ba90bd5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
11 changes: 6 additions & 5 deletions src/components/masa-interface/pages/gallery/gallery.stories.tsx
Expand Up @@ -3,8 +3,9 @@ import { MasaProvider } from '../../../../provider';
import { Meta, StoryObj } from '@storybook/react';
import { Gallery } from '.';
import { GalleryItem } from './galleryItem';
import { CustomGallerySBT } from './gallery';

const customRenderWhaleSBT = {
const customRenderWhaleSBT: CustomGallerySBT = {
name: 'Solid World Whale SBT',
address: '0xd843fB69473F77fF45502e1EB8733B6DD7feC98F',
network: 'polygon',
Expand All @@ -19,7 +20,7 @@ const customRenderWhaleSBT = {
},
};

const DackieSBT = {
const DackieSBT: CustomGallerySBT = {
name: 'Dackies SBT',
address: '0xbA444542E493Ed497D9Ef7f2ed596244a1952Ba2',
network: 'polygon',
Expand All @@ -32,7 +33,7 @@ const DackieSBT = {
},
};

const AmbassadorOGSBT = {
const AmbassadorOGSBT: CustomGallerySBT = {
name: 'Masa Ambassador OG SBT',
address: '0x376f5039Df4e9E9c864185d8FaBad4f04A7E394A',
network: 'polygon',
Expand All @@ -45,7 +46,7 @@ const AmbassadorOGSBT = {
},
};

const AmbassadorSBT = {
const AmbassadorSBT: CustomGallerySBT = {
name: 'Masa Ambassador SBT',
address: '0x3F1EFED96Eb7f98F0618136133D795F5997ECEf4',
network: 'polygon',
Expand All @@ -58,7 +59,7 @@ const AmbassadorSBT = {
},
};

const GoodDollarSBT = {
const GoodDollarSBT: CustomGallerySBT = {
name: 'Good Dollar SBT',
address: '0x3F1EFED96Eb7f98F0618136133D795F5997ECEf4',
network: 'celo',
Expand Down
11 changes: 9 additions & 2 deletions src/components/masa-interface/pages/gallery/gallery.tsx
@@ -1,5 +1,10 @@
import React from 'react';
import { ICreditScore, IGreen, SoulNameDetails } from '@masa-finance/masa-sdk';
import type {
ICreditScore,
IGreen,
NetworkName,
SoulNameDetails,
} from '@masa-finance/masa-sdk';
import { BigNumber } from 'ethers';
import { Tabs } from './tabs';
import { useMasa } from '../../../../provider';
Expand All @@ -23,6 +28,7 @@ interface CreditScores {
tokenUri: string;
metadata?: ICreditScore | undefined;
}

export interface Tabs {
items: SoulNameDetails[] | Greens[] | CreditScores[];
render: (SBT: any) => JSX.Element;
Expand All @@ -33,13 +39,14 @@ export interface Tabs {
export interface CustomGallerySBT {
name: string;
address: string;
network: string;
network: NetworkName;
getMetadata: (item: { tokenId; tokenUri }) => Promise<{
image: string;
name: string;
description: string;
}>;
}

export const Gallery = ({ setIndex, context }) => {
const { masa, connect } = useMasa();
return (
Expand Down

0 comments on commit ba90bd5

Please sign in to comment.