Adding veOcean stats

This commit is contained in:
Jamie Hewitt 2023-05-11 20:00:32 +03:00
parent 48e8f9427a
commit f5bc3bc89f
4 changed files with 45 additions and 4 deletions

View File

@ -8,9 +8,6 @@ function MenuLink({ name, path }: { name: string; path: string }) {
const classes =
router?.pathname === path ? `${styles.link} ${styles.active}` : styles.link
console.log(name, path)
console.log('classes', classes)
console.log('router', router.pathname)
return (
<Link href={path} className={classes}>

View File

@ -0,0 +1,6 @@
[
{ "title": "Deposits", "path": "/deposits" },
{ "title": "Actions", "path": "/actions" },
{ "title": "Weekly Locked Amount", "path": "/weeklyLockedAmount" },
{ "title": "Allocations", "path": "/allocations" }
]

View File

@ -20,7 +20,9 @@ export default function Stats() {
<LogoAsset className={styles.logo} />
<h1 className={styles.title}>Ocean Protocol Stats</h1>
<p className={styles.description}>Stats for usage of Ocean Protocol.</p>
<p className={styles.description}>
Core stats for usage of Ocean Protocol.
</p>
</header>{' '}
<main>
<div className={styles.chartGrid}>

View File

@ -0,0 +1,36 @@
import React from 'react'
import Head from 'next/head'
import styles from '../styles/Home.module.css'
import LogoAsset from '../images/logo.svg'
import Chart from '../components/Chart'
import stats from '../config/veOceanStats.json'
export default function Stats() {
return (
<div className={styles.app}>
<Head>
<title>Ocean Protocol Stats</title>
<meta
name="description"
content="Status overview of all deployed components hosted by the Ocean Protocol Foundation."
/>
<link rel="icon" href="/favicon.ico" />
</Head>
<header className={styles.header}>
<LogoAsset className={styles.logo} />
<h1 className={styles.title}>Ocean Protocol Stats</h1>
<p className={styles.description}>
Core stats for usage of Ocean Protocol.
</p>
</header>{' '}
<main>
<div className={styles.chartGrid}>
{stats.map((chart) => (
<Chart key={chart.title} path={chart.path} title={chart.title} />
))}
</div>
</main>
</div>
)
}