ChainSafe / filsnap

MetaMask snap for interacting with Filecoin dapps.
https://filsnap.chainsafe.io
Apache License 2.0
107 stars 41 forks source link

[bug]: 'Box cannot be used as a JSX component' #231

Closed allenwalker3 closed 1 year ago

allenwalker3 commented 1 year ago

Describe the bug

Ubuntu LTS Distributor ID: Ubuntu Description: Ubuntu 20.04.5 LTS Release: 20.04 Codename: focal

on master / origin

To Reproduce

  1. run 'yarn install'
  2. run 'yarn demo'
  3. Get error message in console
  4. "Connect to Metamask" button is not clickable in localhost:3000 webpage

Relevant log output

Failed to compile.

/home/allen/apps/filsnap/packages/example/src/components/Account/Account.tsx
TypeScript error in /home/allen/apps/filsnap/packages/example/src/components/Account/Account.tsx(31,26):
'Box' cannot be used as a JSX component.
  Its element type 'ReactElement<any, any> | Component<BoxProps, any, any> | null' is not a valid JSX element.  TS2786

    29 |                         <Typography variant="subtitle2">{props.address}</Typography>
    30 |                         <Divider light/>
  > 31 |                         <Box m={"0.5rem"}/>
       |                          ^
    32 |                         <Typography variant="h6">PUBLIC KEY:</Typography>
    33 |                         <Typography variant="subtitle2">{props.publicKey}</Typography>
    34 |                         <Divider light/>

Expected behavior

Clicking "Connect to Metamask" should interface with Metamask flask but button will not click.

Additional context

filesnap