-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display snapshot and POAP + ENS support (#411)
* Add snapshot activity * Add getDateFromUnix * Tidy up profile page * Add support for POAP badges * Show Snapshot avatar and fix TwitterAvatar * Display spaces on event page * Add alt title * Display ENS reverse record * Support ENS forward lookup * Change prefix
- Loading branch information
Showing
12 changed files
with
384 additions
and
72 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 |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
"dependencies": { | ||
"@emotion/core": "^10.0.27", | ||
"@emotion/styled": "^10.0.27", | ||
"@ensdomains/ens-contracts": "^0.0.3", | ||
"@wearekickback/contracts": "npm:@wearekickback/[email protected]", | ||
"@wearekickback/shared": "^1.14.1", | ||
"apollo-cache-inmemory": "^1.2.8", | ||
|
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,27 @@ | ||
import React from 'react' | ||
import styled from '@emotion/styled' | ||
import { ENS_NAME_QUERY } from '../../graphql/queries' | ||
import { useQuery } from 'react-apollo' | ||
import EtherScanLink from '../Links/EtherScanLink' | ||
|
||
const AddressLink = ({ userAddress, prefix = '' }) => { | ||
const { data: ensData } = useQuery(ENS_NAME_QUERY, { | ||
variables: { userAddress } | ||
}) | ||
|
||
const ensName = | ||
ensData && | ||
ensData.getEnsName && | ||
ensData.getEnsName.name && | ||
ensData.getEnsName.name[0] | ||
|
||
return ( | ||
<EtherScanLink address={userAddress}> | ||
{ensName | ||
? `${prefix}${ensName}` | ||
: `${prefix}${userAddress.slice(0, 6)}...${userAddress.slice(-4)}`} | ||
</EtherScanLink> | ||
) | ||
} | ||
|
||
export default AddressLink |
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.