Improved image expansion in Projects. Introduced Mods page.
This commit is contained in:
25
components/ModList.tsx
Normal file
25
components/ModList.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
"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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user