feat: tip loading status

This commit is contained in:
DIYgod
2023-03-21 01:46:51 +00:00
parent 7606b1e91c
commit 51d24af5d4
4 changed files with 9 additions and 4 deletions
+2 -1
View File
@@ -100,5 +100,6 @@
"xn--psu263e-5088",
"cryptonerdcn",
"fzdwx-2094",
"ovler"
"ovler",
"stz"
]
+3 -1
View File
@@ -152,7 +152,9 @@ export const PatronModal: React.FC<{
{t(page ? "Latest tipper" : "Latest patrons")}
</div>
<div className="text-zinc-500 text-sm mt-2">
{tips.data?.pages?.[0]?.list?.length ? (
{tips.isLoading ? (
"Loading..."
) : tips.data?.pages?.[0]?.list?.length ? (
<>
<ul className="flex items-center justify-center">
{tips.data.pages[0].list?.map((tip, index) => (
+3 -1
View File
@@ -46,7 +46,9 @@ export default function TokensPage() {
const tokens = [
{
name: "MIRA",
balance: miraBalance.data?.data || 0,
balance: miraBalance.isLoading
? "Loading..."
: miraBalance.data?.data || 0,
description: (
<>
<p>
+1 -1
View File
@@ -415,7 +415,7 @@ export const useGetMiraBalance = (address?: string) => {
return useQuery(["getMiraBalance", address], async () => {
if (!address) {
return {
data: "0",
data: "Loading...",
}
}
return siteModel.getMiraBalance(address, contract)