Skip to content

Commit

Permalink
added some types
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed May 8, 2023
1 parent 4df7efa commit 83309b3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/masa-interface/masa-interface.tsx
Expand Up @@ -14,7 +14,7 @@ import { InterfaceSuccessCreateIdentity } from './pages/success-create-identity'
import { InterfaceSwitchChain } from './pages/switch-chain';
import { useAccount } from 'wagmi';

const pages = {
const pages: { [index: string]: JSX.Element } = {
connector: <InterfaceConnector disableMetamask={true} />,
createIdentity: <InterfaceCreateIdentity />,
successIdentityCreate: <InterfaceSuccessCreateIdentity />,
Expand Down Expand Up @@ -155,7 +155,7 @@ export const MasaInterface = ({
height={isModal ? 340 : undefined}
>
<PageSwitcher
page={page}
page={page as string}
useRainbowKit={useRainbowKit}
disableMetamask={disableMetamask}
/>
Expand All @@ -169,14 +169,14 @@ const PageSwitcher = ({
useRainbowKit,
disableMetamask,
}: {
page: string | null;
page: string;
useRainbowKit: boolean | undefined;
disableMetamask: boolean | undefined;
}) => {
if (!useRainbowKit) {
return page === 'connector'
? pages[page]({ disableMetamask })

Check failure on line 178 in src/components/masa-interface/masa-interface.tsx

View workflow job for this annotation

GitHub Actions / Build, lint, and test on Node

This expression is not callable.
: pages[page as string];
: pages[page];
} else {
return page ? pages[page] : null;
}
Expand Down

0 comments on commit 83309b3

Please sign in to comment.