mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-02 18:34:39 -05:00
manga search UI done
This commit is contained in:
26
webUI/react/src/components/MangaGrid.tsx
Normal file
26
webUI/react/src/components/MangaGrid.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import React from 'react';
|
||||
import MangaCard from './MangaCard';
|
||||
|
||||
interface IProps{
|
||||
mangas: IManga[]
|
||||
message?: string
|
||||
}
|
||||
|
||||
export default function MangaGrid(props: IProps) {
|
||||
const { mangas, message } = props;
|
||||
let mapped;
|
||||
|
||||
if (mangas.length === 0) {
|
||||
mapped = <h3>{message !== undefined ? message : 'loading...'}</h3>;
|
||||
} else {
|
||||
mapped = (
|
||||
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(5, auto)', gridGap: '1em' }}>
|
||||
{mangas.map((it) => (
|
||||
<MangaCard manga={it} />
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return mapped;
|
||||
}
|
||||
Reference in New Issue
Block a user