-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e8e27cd
commit 82e47b8
Showing
100 changed files
with
4,112 additions
and
5,046 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules/ | ||
/build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,6 @@ | ||
import { Center, Heading, Spinner } from '@chakra-ui/react'; | ||
import { connectAPI } from 'components/ConnectSubstrate/ConnectSubstrateUtils'; | ||
|
||
import { useAppDispatch, useAppSelector } from 'hooks/useRedux'; | ||
|
||
import { RouterProvider } from 'react-router-dom'; | ||
import router from 'routes/routes'; | ||
|
||
export default function App() { | ||
const dispatch = useAppDispatch(); | ||
|
||
const { apiState, socket, jsonrpc } = useAppSelector( | ||
state => state.substrate | ||
); | ||
|
||
connectAPI({ socket, jsonrpc, apiState, dispatch }); | ||
|
||
if (apiState !== 'READY') { | ||
return ( | ||
<Center height="100vh" gap={4}> | ||
<Spinner color="primary.a.500" size="md" /> | ||
<Heading fontSize="lg" color="shader.a.600" fontWeight="medium"> | ||
Connecting to Substrate | ||
</Heading> | ||
</Center> | ||
); | ||
} | ||
|
||
return <RouterProvider router={router} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,20 @@ | ||
import { Box, BoxProps } from '@chakra-ui/react'; | ||
import { Box } from '@chakra-ui/react'; | ||
import Identicon from '@polkadot/react-identicon'; | ||
import { IdentityProps } from '@polkadot/react-identicon/types'; | ||
|
||
import { jsNumberForAddress } from 'react-jazzicon'; | ||
import Jazzicon from 'react-jazzicon/dist/Jazzicon'; | ||
|
||
interface AvatarJazziconProps { | ||
address: string; | ||
sx?: BoxProps; | ||
} | ||
|
||
export default function AvatarJazzicon({ address, sx }: AvatarJazziconProps) { | ||
export default (props: IdentityProps) => { | ||
/* | ||
but you cannot using variable as chakra | ||
Ex: borderRadius: "full" // cannot so should '100%' | ||
*/ | ||
return ( | ||
<Box title={address} display="inline-flex" as="figure"> | ||
<Jazzicon | ||
paperStyles={{ | ||
border: '0.09375rem solid', | ||
borderColor: 'currentColor', | ||
color: 'transparent', | ||
borderRadius: '100%', | ||
width: '2.5rem', | ||
height: '2.5rem', | ||
...sx, | ||
}} | ||
svgStyles={{ | ||
width: '100%', | ||
height: '100%', | ||
}} | ||
seed={jsNumberForAddress(address)} | ||
/> | ||
</Box> | ||
<Box | ||
as={Identicon} | ||
size={40} | ||
theme="substrate" | ||
overflow="hidden" | ||
pointerEvents="none" // this prevent onCopy | ||
{...props} | ||
/> | ||
); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Icon, IconProps, useClipboard } from '@chakra-ui/react'; | ||
import CopyIcon from 'public/assets/line/copy.svg'; | ||
import DoneIcon from 'public/assets/fill/done.svg'; | ||
|
||
interface ClipBoardProps { | ||
value: string; | ||
sx?: IconProps; | ||
} | ||
|
||
export default ({ value, sx }: ClipBoardProps) => { | ||
const { hasCopied, onCopy } = useClipboard(value); | ||
|
||
return ( | ||
<Icon | ||
onClick={onCopy} | ||
width={5} | ||
height={5} | ||
color="primary.a.300" | ||
cursor="pointer" | ||
as={hasCopied ? DoneIcon : CopyIcon} | ||
{...sx} | ||
/> | ||
); | ||
}; |
Empty file.
Oops, something went wrong.