Files
hwilliams-dev/components/ModList.tsx

26 lines
609 B
TypeScript

"use client";
import type { Mod } from "@/data/content";
import ModCard from "@/components/ModCard";
import "../styles/mods.css";
type Props = {
mods: Mod[];
visible?: boolean;
};
/** The list of mods belonging to a single game. Two columns on desktop, one on mobile. */
export default function ModList({ mods, visible = true }: Props) {
if (mods.length === 0) {
return <p className="mod-list-empty">Nothing published here yet.</p>;
}
return (
<div className="mod-list">
{mods.map((mod) => (
<ModCard key={mod.id} mod={mod} visible={visible} />
))}
</div>
);
}