File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ import { useRouter } from "next/router";
1313
1414export const ContactCard : FunctionComponent < {
1515 address : string ;
16- } > = ( { address } ) => {
16+ display ?: string ;
17+ } > = ( { address, display } ) => {
1718 const router = useRouter ( ) ;
1819 const launch = useLaunch ( ) ;
1920 const ensAvatar = useEnsAvatar ( {
@@ -56,7 +57,9 @@ export const ContactCard: FunctionComponent<{
5657 className = "border-none bg-none mt-auto text-2xl font-bold flex flex-grow justify-center items-center min-h-18"
5758 onClick = { ( ) => launch ( address ) }
5859 >
59- { isEnsName ( ensName . name )
60+ { typeof display === "string"
61+ ? display
62+ : isEnsName ( ensName . name )
6063 ? ensName . name
6164 : address . slice ( 0 , 6 ) + "..." + address . slice ( - 4 ) }
6265 </ button >
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export const Conversations: FunctionComponent = () => {
4040 { seeds . map ( ( seed ) => {
4141 return (
4242 < div key = { seed } className = "opacity-25" >
43- < ContactCard address = { seed } />
43+ < ContactCard display = "Connect Wallet" address = { seed } />
4444 </ div >
4545 ) ;
4646 } ) }
@@ -54,7 +54,7 @@ export const Conversations: FunctionComponent = () => {
5454 { seeds . map ( ( seed ) => {
5555 return (
5656 < div key = { seed } className = "opacity-25" >
57- < ContactCard address = { seed } />
57+ < ContactCard address = { seed } display = "Sign In" />
5858 </ div >
5959 ) ;
6060 } ) }
Original file line number Diff line number Diff line change 11import type { NextPage } from "next" ;
2- import { Profile } from "components" ;
3- import { useAccount } from "wagmi" ;
2+ import { Conversations } from "components/pages/Conversations" ;
43
54const Home : NextPage = ( ) => {
6- const account = useAccount ( ) ;
7- return < Profile handle = { account . address } /> ;
5+ return < Conversations /> ;
86} ;
97
108export default Home ;
You can’t perform that action at this time.
0 commit comments