From 50e0e601ce0248d81506a8c8a5f18340a32d9bec Mon Sep 17 00:00:00 2001 From: rtm516 Date: Tue, 30 Jul 2024 11:12:37 +0100 Subject: [PATCH] Add floodgate fabric back to downloads page --- src/components/ProjectDownload.tsx | 17 ++++++++++++++++- src/pages/download/index.tsx | 7 +++++++ 2 files changed, 23 insertions(+), 1 deletion(-) 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" + } }} />