import {BlacklistItem} from "~/classes/blacklistItem";
import {Button, CircularProgress} from "@mui/material";

export default function ItemList({ isFetching, blacklistItems }: { isFetching: boolean, blacklistItems: BlacklistItem[] }) {
    if (isFetching){
        return(
            <div className="loader">
                <CircularProgress aria-label="Loading…" />
            </div>
        )
    } else {
        return (
            <div className="list-container">
                <div className="item-list">
                    {blacklistItems.map((item) => {
                        return <Button variant="text">{item.link}</Button>
                    })}
                </div>
            </div>
        )
    }
}