-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new queries, update filtering, sorting, receiving ensNames
- Loading branch information
1 parent
35bd323
commit 3701013
Showing
11 changed files
with
240 additions
and
215 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,25 @@ | ||
import React from "react"; | ||
import { useEnsName } from "wagmi"; | ||
|
||
const trimAddress = (address: string): string => { | ||
const leftSide = address.slice(0, 4); | ||
|
||
const rightSide = address.slice(-4); | ||
|
||
return leftSide + "..." + rightSide; | ||
}; | ||
|
||
const UseEnsName = (address: any) => { | ||
const ensName = useEnsName({ | ||
address: address.address, | ||
chainId: 1, | ||
}); | ||
|
||
return ( | ||
<div> | ||
{ensName.data === null ? trimAddress(address.address) : ensName.data} | ||
</div> | ||
); | ||
}; | ||
|
||
export default UseEnsName; |
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 |
---|---|---|
@@ -1,27 +1,31 @@ | ||
import type { Metadata } from "next"; | ||
"use client"; | ||
|
||
//import type { Metadata } from "next"; | ||
import { inter, spline, aeonik } from "./config"; | ||
import { Providers } from "./providers"; | ||
import { ApolloProvider } from "@apollo/client"; | ||
import { client } from "./utils/client"; | ||
|
||
import "./globals.css"; | ||
|
||
export const metadata: Metadata = { | ||
title: "Leaderboard", | ||
description: "Fluidity Leaderbord page", | ||
}; | ||
//export const metadata: Metadata = { | ||
// title: "Leaderboard", | ||
// description: "Fluidity Leaderbord page", | ||
//}; | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
function RootLayout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<html | ||
lang="en" | ||
className={`${inter.className} ${spline.className} ${aeonik.className}`} | ||
> | ||
<body> | ||
<Providers>{children}</Providers> | ||
<ApolloProvider client={client}> | ||
<Providers>{children}</Providers> | ||
</ApolloProvider> | ||
</body> | ||
</html> | ||
); | ||
} | ||
|
||
export default RootLayout; |
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.