-
Notifications
You must be signed in to change notification settings - Fork 7
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 #108 from HathorNetwork/dev
Release v0.7.9
- Loading branch information
Showing
14 changed files
with
163 additions
and
31 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,35 @@ | ||
import React, { useState, useEffect } from 'react'; | ||
import { tokenBannedMessage } from '../../messages'; | ||
|
||
|
||
const TokenAlerts = (props) => { | ||
const [token, setToken] = useState(props.token); | ||
|
||
useEffect(() => { | ||
setToken(props.token); | ||
}, [props.token]); | ||
|
||
const bannedAlert = () => { | ||
if (!token.banned) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<div className="alert alert-danger backup-alert" role="alert"> | ||
<i className="fa fa-exclamation-triangle mr-2" title="Banned Token"></i> | ||
{tokenBannedMessage} | ||
</div> | ||
) | ||
} | ||
|
||
return ( | ||
<> | ||
<div className="alert alert-warning backup-alert" role="alert"> | ||
Only the UID is unique, there might be more than one token with the same name and symbol. | ||
</div> | ||
{bannedAlert()} | ||
</> | ||
); | ||
} | ||
|
||
export default TokenAlerts; |
2 changes: 1 addition & 1 deletion
2
src/components/TokenConfig.js → src/components/token/TokenConfig.js
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
6 changes: 3 additions & 3 deletions
6
src/components/TokenDetailsTopNFT.js → src/components/token/TokenDetailsTopNFT.js
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
File renamed without changes.
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,50 @@ | ||
import React, { useState, useEffect } from 'react'; | ||
import { tokenBannedMessage } from '../../messages'; | ||
|
||
|
||
const TokenMarkers = (props) => { | ||
const [token, setToken] = useState(props.token); | ||
|
||
useEffect(() => { | ||
setToken(props.token); | ||
}, [props.token]); | ||
|
||
const verifiedMarker = () => { | ||
if (!token.verified) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<button className="info-hover-wrapper btn btn-link pl-2"> | ||
<i className="fa fa-check-circle fa-lg text-info" title="Verified"></i> | ||
<span className="subtitle info-hover-popover"> | ||
This is a verified token. <a href="https://hathor.network" >Learn more.</a> | ||
</span> | ||
</button> | ||
) | ||
} | ||
|
||
const bannedMarker = () => { | ||
if (!token.banned) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<button className="info-hover-wrapper btn btn-link pl-2"> | ||
<i className="fa fa-exclamation-triangle fa-lg text-danger" title="Banned"></i> | ||
<span className="subtitle info-hover-popover"> | ||
{tokenBannedMessage} | ||
</span> | ||
</button> | ||
) | ||
} | ||
|
||
return ( | ||
<> | ||
{verifiedMarker()} | ||
{bannedMarker()} | ||
</> | ||
); | ||
} | ||
|
||
export default TokenMarkers; |
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,30 @@ | ||
import React, { useState, useEffect } from 'react'; | ||
import TokenMarkers from './TokenMarkers'; | ||
|
||
|
||
const TokenTitle = (props) => { | ||
|
||
const [token, setToken] = useState(props.token); | ||
|
||
useEffect(() => { | ||
setToken(props.token); | ||
}, [props.token]); | ||
|
||
const bannedClassName = () => { | ||
if (!token.banned) { | ||
return ''; | ||
} | ||
|
||
return 'text-danger' | ||
} | ||
|
||
return ( | ||
<> | ||
<strong className={bannedClassName()} >{token.name} ({token.symbol})</strong> | ||
<TokenMarkers token={token} /> | ||
</> | ||
) | ||
|
||
} | ||
|
||
export default TokenTitle; |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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