diff --git a/webUI/react/src/App.tsx b/webUI/react/src/App.tsx index 1680c2d5..80db9b81 100644 --- a/webUI/react/src/App.tsx +++ b/webUI/react/src/App.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import React, { useEffect, useState } from 'react'; import { BrowserRouter as Router, Switch, @@ -8,6 +8,34 @@ import Button from '@material-ui/core/Button'; import NavBar from './components/NavBar'; import ExtensionCard from './components/ExtensionCard'; import SourceCard from './components/SourceCard'; +import MangaCard from './components/MangaCard'; + +function MangaPage() { + let mapped; + const [mangas, setMangas] = useState([]); + + useEffect(() => { + fetch('https://picsum.photos/v2/list') + .then((response) => response.json()) + .then((data: { author: string, download_url: string }[]) => setMangas( + data.map((it) => ({ name: it.author, imageUrl: it.download_url })), + )); + }); + + if (mangas.length === 0) { + mapped =

wait

; + } else { + mapped = ( +
+ {mangas.map((it) => ( + + ))} +
+ ); + } + + return mapped; +} function Extensions() { let mapped; @@ -56,6 +84,9 @@ export default function App() { + + +