diff --git a/src/components/ProjectDownload.tsx b/src/components/ProjectDownload.tsx index 58aa320..a3eadd9 100644 --- a/src/components/ProjectDownload.tsx +++ b/src/components/ProjectDownload.tsx @@ -12,10 +12,13 @@ interface ProjectDownloadProps { downloadsInfo: { [key: string]: string | React.ReactNode; }; + additionalDownloads?: { + [key: string]: { url: string, file: string }; + }; gridColumns?: number; } -export const ProjectDownload: React.FC = ({ projectId, description, setup, downloadsInfo, gridColumns }) => { +export const ProjectDownload: React.FC = ({ projectId, description, setup, downloadsInfo, additionalDownloads, gridColumns }) => { const [platformInfo, setPlatformInfo] = useState({ project_id: '', project_name: '', @@ -93,6 +96,18 @@ export const ProjectDownload: React.FC = ({ projectId, des ) }) } + { + additionalDownloads && Object.keys(additionalDownloads).map((platformId, i) => { + return ( + + {downloadsInfo[platformId]} +
+ {additionalDownloads[platformId].file} +
+
+ ) + }) + } diff --git a/src/pages/download/index.tsx b/src/pages/download/index.tsx index 379dcce..0c04419 100644 --- a/src/pages/download/index.tsx +++ b/src/pages/download/index.tsx @@ -52,6 +52,13 @@ const DownloadPage: React.FC = () => ( bungee: , spigot: , velocity: , + fabric: , + }} + additionalDownloads={{ + fabric: { + url: "https://modrinth.com/mod/floodgate", + file: "floodgate-fabric.jar" + } }} />