From 6fe794bcd5a57acc080f137cba1db7a0c5dd5f44 Mon Sep 17 00:00:00 2001 From: lza_menace Date: Sat, 11 Mar 2023 20:46:37 -0800 Subject: [PATCH] start fetching metadata --- src/index.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 29e7b6d..7a516ee 100644 --- a/src/index.js +++ b/src/index.js @@ -7,12 +7,22 @@ import Chevron from './chevron.png'; const startToken = 1; const endToken = 5555; -const url = "https://files.lzahq.tech/schizoposters/images/"; +const url = "https://files.lzahq.tech/schizoposters/"; function getRandomToken() { return Math.floor(Math.random() * (endToken - startToken) + startToken) } +function Metadata(token) { + fetch(url + 'metadata/' + token + '.json') + .then((res) => res.json()) + .then((data) => console.log(data)) + return ( + <> + + ) +} + function App() { const [token, setToken] = useState(0); if (token === 0) { @@ -24,9 +34,10 @@ function App() {

SCHIZOPOSTER #{token}

- - {"SCHIZOPOSTER + + {"SCHIZOPOSTER +