diff --git a/frontend/public/ethpandaops.png b/frontend/public/ethpandaops.png new file mode 100644 index 00000000..d44f108f Binary files /dev/null and b/frontend/public/ethpandaops.png differ diff --git a/frontend/public/header.png b/frontend/public/header.png new file mode 100644 index 00000000..52c2b5f9 Binary files /dev/null and b/frontend/public/header.png differ diff --git a/frontend/src/components/layout/Header.tsx b/frontend/src/components/layout/Header.tsx index 7257cb95..d0e36ba2 100644 --- a/frontend/src/components/layout/Header.tsx +++ b/frontend/src/components/layout/Header.tsx @@ -39,7 +39,7 @@ export const Header = ({ onToggleSidebar }: HeaderProps) => { EthPandaOps Logo diff --git a/frontend/src/pages/About.tsx b/frontend/src/pages/About.tsx index 0cd8f945..0971a92a 100644 --- a/frontend/src/pages/About.tsx +++ b/frontend/src/pages/About.tsx @@ -3,39 +3,18 @@ import { Github, ExternalLink } from 'lucide-react' export const About = () => { return (
-

About EthPandaOps Lab

+

About The Lab

- EthPandaOps Lab is an experimental platform that provides insights into the Ethereum network. - We collect, analyze, and visualize data from various sources to help understand the network's health, - client diversity, and overall ecosystem. + The Lab is an experimental platform that provides insights into Ethereum. + Here we present data and visualizations that we've collected. All of our data is public and open source.

+
-

Our Data Sources

-
-
-

Xatu

-

- A beacon chain event collector and metrics exporter. Xatu helps monitor the Ethereum network by collecting: -

-
- - - View Xatu on GitHub - -
-
-
- -

About EthPandaOps

-

- Check out our main website for more information: +

About EthPandaOps

+

+ Check out our main website for more information:

@@ -55,9 +34,8 @@ export const About = () => { className="inline-flex items-center justify-center px-6 py-3 text-base font-medium text-indigo-600 bg-indigo-100 hover:bg-indigo-200 dark:text-white dark:bg-indigo-900 dark:hover:bg-indigo-800 rounded-lg transition-colors" > - View Our Projects - -
+ View Our Projects +
) diff --git a/frontend/src/pages/ClientStats.tsx b/frontend/src/pages/ClientStats.tsx deleted file mode 100644 index e886bb92..00000000 --- a/frontend/src/pages/ClientStats.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import { useEffect, useState } from 'react' - -interface ClientVersion { - client_name: string - client_version: string - count: number -} - -export const ClientStats = () => { - const [data, setData] = useState([]) - const [loading, setLoading] = useState(true) - const [error, setError] = useState(null) - - useEffect(() => { - fetch('/api/data/xatu-public-contributors/top_client_versions.json') - .then((res) => { - if (!res.ok) throw new Error('Failed to fetch data') - return res.json() - }) - .then(setData) - .catch((err) => setError(err.message)) - .finally(() => setLoading(false)) - }, []) - - if (loading) return
Loading...
- if (error) return
Error: {error}
- if (!data.length) return
No data available
- - return ( -
-

Client Statistics

-
- - - - - - - - - - {data.map((item, index) => ( - - - - - - ))} - -
- Client - - Version - - Count -
- {item.client_name} - - {item.client_version} - - {item.count} -
-
-
- ) -} \ No newline at end of file diff --git a/frontend/src/pages/Contributors.tsx b/frontend/src/pages/Contributors.tsx deleted file mode 100644 index b8aefcef..00000000 --- a/frontend/src/pages/Contributors.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import { useEffect, useState } from 'react' - -interface ContributorData { - dates: string[] - contributors: number[] -} - -export const Contributors = () => { - const [data, setData] = useState(null) - const [loading, setLoading] = useState(true) - const [error, setError] = useState(null) - - useEffect(() => { - fetch('/api/data/xatu-public-contributors/contributors_over_time.json') - .then((res) => { - if (!res.ok) throw new Error('Failed to fetch data') - return res.json() - }) - .then(setData) - .catch((err) => setError(err.message)) - .finally(() => setLoading(false)) - }, []) - - if (loading) return
Loading...
- if (error) return
Error: {error}
- if (!data) return
No data available
- - return ( -
-

Xatu Contributors

-
-
- {data.contributors[data.contributors.length - 1]} -
-
- Active contributors in the last 24 hours -
-
- {/* Add chart here once we have a charting library */} -
- ) -} \ No newline at end of file diff --git a/frontend/src/pages/Gallery.tsx b/frontend/src/pages/Gallery.tsx deleted file mode 100644 index a2dcaeb1..00000000 --- a/frontend/src/pages/Gallery.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { useQuery } from '@tanstack/react-query' -import getFruits from 'api/getFruits' -import Fruit from 'components/Fruit' -import Head from 'components/Head' -import LoadingOrError from 'components/LoadingOrError' -import type { ReactElement } from 'react' - -export default function GalleryPage(): ReactElement { - const { isPending, isError, error, data } = useQuery({ - queryKey: ['fruits'], - queryFn: getFruits - }) - if (isPending || isError) { - return - } - - return ( - <> - -
- {data.map((fruit, index) => ( - - ))} -
- - ) -} diff --git a/frontend/src/pages/Home.tsx b/frontend/src/pages/Home.tsx index a6430fec..a67d84ae 100644 --- a/frontend/src/pages/Home.tsx +++ b/frontend/src/pages/Home.tsx @@ -3,25 +3,35 @@ import { Link } from 'react-router-dom' export const Home = () => { return ( -
- EthPandaOps Logo -

- Welcome to EthPandaOps Lab -

-

- The Lab is our experimental platform for exploring Ethereum. -

- - Explore Data - - +
+ {/* Background Image */} +
+ +
+
+ + {/* Content */} +
+
+

+ Welcome to The Lab +

+

+ The Lab is our experimental platform for exploring Ethereum +

+ + Explore + + +
+
) } \ No newline at end of file diff --git a/frontend/src/utils/data.ts b/frontend/src/utils/data.ts index a14031f2..03b6d036 100644 --- a/frontend/src/utils/data.ts +++ b/frontend/src/utils/data.ts @@ -1,4 +1,4 @@ -import { useState, useEffect } from 'react' +import { useQuery } from '@tanstack/react-query' import { getDataUrl } from '../config' export const fetchData = async (path: string): Promise => { @@ -10,25 +10,10 @@ export const fetchData = async (path: string): Promise => { } export const useDataFetch = (path: string) => { - const [data, setData] = useState(null) - const [loading, setLoading] = useState(true) - const [error, setError] = useState(null) - - useEffect(() => { - const fetchDataFromPath = async () => { - try { - setLoading(true) - const result = await fetchData(path) - setData(result) - } catch (err) { - setError(err instanceof Error ? err : new Error('Unknown error occurred')) - } finally { - setLoading(false) - } - } - - fetchDataFromPath() - }, [path]) + const { data, isLoading: loading, error } = useQuery({ + queryKey: ['data', path], + queryFn: () => fetchData(path), + }) return { data, loading, error } } \ No newline at end of file