-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #153 from chain4travel/feat-create-edit-msig
Merge remote-tracking branch 'origin/suite' into suite-c4t
- Loading branch information
Showing
21 changed files
with
392 additions
and
115 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
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 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React, { useRef } from 'react' | ||
import { mountVersionComponent } from 'wallet/mountVersionComponent' | ||
import { useEffectOnce } from '../../hooks/useEffectOnce' | ||
|
||
const WalletVersionComponent = () => { | ||
const ref = useRef(null) | ||
useEffectOnce(() => { | ||
mountVersionComponent(ref.current) | ||
}) // eslint-disable-line react-hooks/exhaustive-deps | ||
|
||
return ( | ||
<> | ||
<div ref={ref} /> | ||
</> | ||
) | ||
} | ||
|
||
export default React.memo(WalletVersionComponent) |
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,45 @@ | ||
import React from 'react' | ||
import WalletVersionComponent from './LoadWalletVersion' | ||
import { Box, Typography } from '@mui/material' | ||
import { useStore } from 'Explorer/useStore' | ||
import { Link } from 'react-router-dom' | ||
import { SUITE, SUITE_EXPLORER, SUITE_WALLET } from '../../constants/route-paths' | ||
|
||
const LinkButton = ({ children, type, to }) => { | ||
return ( | ||
<Box sx={{ display: 'flex', alignItems: 'center', gap: '.5rem' }}> | ||
<Typography variant="body1" component="p"> | ||
{type} | ||
</Typography> | ||
<Link | ||
rel="noopener noreferrer" | ||
target="_blank" | ||
style={{ textDecoration: 'none' }} | ||
to={to} | ||
> | ||
<Typography variant="body2" component="p" color={'primary'}> | ||
{children} | ||
</Typography> | ||
</Link> | ||
</Box> | ||
) | ||
} | ||
|
||
const Version = () => { | ||
const { state } = useStore() | ||
return ( | ||
<Box sx={{ display: 'flex', flexDirection: 'column', gap: '.5rem' }}> | ||
<LinkButton type="Suite" to={SUITE}> | ||
{process.env.GIT_COMMIT_HASH} | ||
</LinkButton> | ||
<LinkButton type="Wallet" to={SUITE_WALLET}> | ||
<WalletVersionComponent /> | ||
</LinkButton> | ||
<LinkButton type="Explorer" to={SUITE_EXPLORER}> | ||
{state.appConfig.commitHash} | ||
</LinkButton> | ||
</Box> | ||
) | ||
} | ||
|
||
export default Version |
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 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 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
Oops, something went wrong.