Skip to content

Commit a28e1fb

Browse files
committed
/ page is now conversations list
* /conversations also routes to convo list * add `display` prop to contact loading card
1 parent dd7c47b commit a28e1fb

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

src/components/cards/ContactCard.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import { useRouter } from "next/router";
1313

1414
export 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>

src/components/pages/Conversations.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
})}

src/pages/index.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import type { NextPage } from "next";
2-
import { Profile } from "components";
3-
import { useAccount } from "wagmi";
2+
import { Conversations } from "components/pages/Conversations";
43

54
const Home: NextPage = () => {
6-
const account = useAccount();
7-
return <Profile handle={account.address} />;
5+
return <Conversations />;
86
};
97

108
export default Home;

0 commit comments

Comments
 (0)