Browse Source

add mobile version for balance dashboard

main
matthew 2 years ago
parent
commit
f95688dd1c
  1. 30
      searching-front/app/core/pages/State/styles.module.css
  2. 6
      searching-front/services/domain-watcher.ts

30
searching-front/app/core/pages/State/styles.module.css

@ -86,8 +86,6 @@
margin-left: 8px;
}
.button {
position: absolute;
top: 2px;
@ -165,13 +163,13 @@
background-color: var(--button_primary);
}
.newestListItemRight:hover .tonScanIcon{
.newestListItemRight:hover .tonScanIcon {
color: white;
background: var(--button_primary);
transition: all .3s ease-in-out;
}
transition: all 0.3s ease-in-out;
}
.tonScanIcon{
.tonScanIcon {
width: 24px;
height: 24px;
border-radius: 50%;
@ -182,8 +180,24 @@
margin-left: 4px;
}
.siteButton,
.tonScanIcon {
transition: background-color 0.2s ease-in-out;
}
@media only screen and (max-width: 500px) {
.newestListItem {
flex-direction: column;
}
.newestListItemRight,
.newestListItemLeft {
padding: 24px 34px;
justify-content: center;
}
.newestListItemRight {
text-align: left;
.siteButton, .tonScanIcon {
transition: background-color .2s ease-in-out;
border-top: 1px solid var(--border_color_main);
border-left: none;
}
}

6
searching-front/services/domain-watcher.ts

@ -24,7 +24,7 @@ const getFullUrl = (dmn: string) => `http://${dmn}`
interface UpsertDmnParams {
available: boolean
walletAddress?: string
tonBalance?: number
tonBalance?: string
}
const upsertDmn = async (
dmn: string,
@ -107,8 +107,10 @@ const fetchDomainInfo = async (url: string) => {
address,
}
}
console.log('There is no domain info ofr', url)
return null
} catch (e) {
console.log('Failed fetch domain info for', url,e)
return null
}
}
@ -134,7 +136,7 @@ const main = async () =>
.then(async (dmn) => {
const domainInfo = await fetchDomainInfo(dmn)
console.log("success dmn", dmn)
upsertDmn(dmn, {available: true, walletAddress:domainInfo?.address,tonBalance:domainInfo?.balance})
upsertDmn(dmn, {available: true, walletAddress:domainInfo?.address, tonBalance:domainInfo?.balance})
})
.catch((dmn) => {
upsertDmn(dmn, {available: false})

Loading…
Cancel
Save