mirror of
https://github.com/oceanprotocol/status-frontend.git
synced 2024-11-25 03:20:08 +01:00
ui consistency
This commit is contained in:
parent
1eea458e46
commit
23ce2558ff
11
package-lock.json
generated
11
package-lock.json
generated
@ -8,6 +8,7 @@
|
|||||||
"name": "status-frontend",
|
"name": "status-frontend",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@oceanprotocol/art": "^3.2.0",
|
||||||
"@oceanprotocol/contracts": "^1.1.7",
|
"@oceanprotocol/contracts": "^1.1.7",
|
||||||
"@oceanprotocol/typographies": "^0.1.0",
|
"@oceanprotocol/typographies": "^0.1.0",
|
||||||
"@svgr/webpack": "^6.5.0",
|
"@svgr/webpack": "^6.5.0",
|
||||||
@ -2833,6 +2834,11 @@
|
|||||||
"node": ">= 8"
|
"node": ">= 8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@oceanprotocol/art": {
|
||||||
|
"version": "3.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@oceanprotocol/art/-/art-3.2.0.tgz",
|
||||||
|
"integrity": "sha512-aUQtg4m5hJlQ0u8C29O9TXJWcAenO3G9vP+vf6LNFkpTDOCMycN/F0SzHS89VNrvGUha8oTDEg7FAkfZBPv2WA=="
|
||||||
|
},
|
||||||
"node_modules/@oceanprotocol/contracts": {
|
"node_modules/@oceanprotocol/contracts": {
|
||||||
"version": "1.1.7",
|
"version": "1.1.7",
|
||||||
"resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.1.7.tgz",
|
"resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.1.7.tgz",
|
||||||
@ -8494,6 +8500,11 @@
|
|||||||
"fastq": "^1.6.0"
|
"fastq": "^1.6.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@oceanprotocol/art": {
|
||||||
|
"version": "3.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@oceanprotocol/art/-/art-3.2.0.tgz",
|
||||||
|
"integrity": "sha512-aUQtg4m5hJlQ0u8C29O9TXJWcAenO3G9vP+vf6LNFkpTDOCMycN/F0SzHS89VNrvGUha8oTDEg7FAkfZBPv2WA=="
|
||||||
|
},
|
||||||
"@oceanprotocol/contracts": {
|
"@oceanprotocol/contracts": {
|
||||||
"version": "1.1.7",
|
"version": "1.1.7",
|
||||||
"resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.1.7.tgz",
|
"resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-1.1.7.tgz",
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
"test": "npm run lint"
|
"test": "npm run lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@oceanprotocol/art": "^3.2.0",
|
||||||
"@oceanprotocol/contracts": "^1.1.7",
|
"@oceanprotocol/contracts": "^1.1.7",
|
||||||
"@oceanprotocol/typographies": "^0.1.0",
|
"@oceanprotocol/typographies": "^0.1.0",
|
||||||
"@svgr/webpack": "^6.5.0",
|
"@svgr/webpack": "^6.5.0",
|
||||||
|
@ -29,11 +29,14 @@ function statusStyle(state: State) {
|
|||||||
|
|
||||||
export default function HomePage(): ReactElement {
|
export default function HomePage(): ReactElement {
|
||||||
const [data, setData] = useState<{ [key: string]: Status }>()
|
const [data, setData] = useState<{ [key: string]: Status }>()
|
||||||
|
const [isLoading, setIsloading] = useState<boolean>()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
async function getStatuses() {
|
async function getStatuses() {
|
||||||
|
setIsloading(true)
|
||||||
const data = await getData()
|
const data = await getData()
|
||||||
setData(data)
|
setData(data)
|
||||||
|
setIsloading(false)
|
||||||
}
|
}
|
||||||
getStatuses()
|
getStatuses()
|
||||||
}, [])
|
}, [])
|
||||||
@ -60,7 +63,10 @@ export default function HomePage(): ReactElement {
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
{Object.entries(data || {}).map(([key, value]) => {
|
{isLoading ? (
|
||||||
|
<div className={styles.loading}>Loading...</div>
|
||||||
|
) : (
|
||||||
|
Object.entries(data || {}).map(([key, value]) => {
|
||||||
const networkKey = key
|
const networkKey = key
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -120,7 +126,9 @@ export default function HomePage(): ReactElement {
|
|||||||
|
|
||||||
<details className={styles.contracts}>
|
<details className={styles.contracts}>
|
||||||
<summary>
|
<summary>
|
||||||
<h3 className={styles.titleComponent}>Deployed Contracts</h3>
|
<h3 className={styles.titleComponent}>
|
||||||
|
Deployed Contracts
|
||||||
|
</h3>
|
||||||
</summary>
|
</summary>
|
||||||
<ul>
|
<ul>
|
||||||
{Object.entries((addresses as any)[networkKey]).map(
|
{Object.entries((addresses as any)[networkKey]).map(
|
||||||
@ -137,7 +145,8 @@ export default function HomePage(): ReactElement {
|
|||||||
</details>
|
</details>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)
|
)
|
||||||
})}
|
})
|
||||||
|
)}
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer className={styles.footer}></footer>
|
<footer className={styles.footer}></footer>
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
.container {
|
.container {
|
||||||
padding: var(--spacer);
|
padding: var(--spacer);
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
background: url('../../node_modules/@oceanprotocol/art/waves/waves.svg')
|
||||||
|
no-repeat center 13.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 50rem) {
|
@media screen and (min-width: 50rem) {
|
||||||
@ -36,7 +38,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.networkName {
|
.networkName {
|
||||||
margin-top: calc(var(--spacer) * 2);
|
margin-top: calc(var(--spacer) * 3);
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,8 +47,10 @@
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
background: var(--background-content);
|
||||||
border-radius: var(--border-radius);
|
border-radius: var(--border-radius);
|
||||||
border: 2px solid var(--border-color);
|
box-shadow: 0 6px 17px 0 var(--box-shadow-color);
|
||||||
|
border: 1px solid var(--border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.titleComponent {
|
.titleComponent {
|
||||||
@ -72,7 +76,7 @@
|
|||||||
fill: var(--font-color-heading);
|
fill: var(--font-color-heading);
|
||||||
height: 4rem;
|
height: 4rem;
|
||||||
width: 4rem;
|
width: 4rem;
|
||||||
margin: 0 auto;
|
margin: 0 auto calc(var(--spacer) / 2) auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
@ -110,3 +114,8 @@
|
|||||||
.contracts .titleComponent {
|
.contracts .titleComponent {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.loading {
|
||||||
|
margin-top: 30vh;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user