Skip to content

Commit

Permalink
Add floodgate fabric back to downloads page
Browse files Browse the repository at this point in the history
  • Loading branch information
rtm516 committed Jul 30, 2024
1 parent 6bd98ee commit 50e0e60
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/components/ProjectDownload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<ProjectDownloadProps> = ({ projectId, description, setup, downloadsInfo, gridColumns }) => {
export const ProjectDownload: React.FC<ProjectDownloadProps> = ({ projectId, description, setup, downloadsInfo, additionalDownloads, gridColumns }) => {
const [platformInfo, setPlatformInfo] = useState<Downloads.Builds>({
project_id: '',
project_name: '',
Expand Down Expand Up @@ -93,6 +96,18 @@ export const ProjectDownload: React.FC<ProjectDownloadProps> = ({ projectId, des
)
})
}
{
additionalDownloads && Object.keys(additionalDownloads).map((platformId, i) => {
return (
<a href={additionalDownloads[platformId].url} key={i} className='no-underline download-button large-button'>
<b>{downloadsInfo[platformId]}</b>
<div>
<FontAwesomeIcon icon={faFileArrowDown}/> {additionalDownloads[platformId].file}
</div>
</a>
)
})
}
</Grid>
</Column>
<Column>
Expand Down
7 changes: 7 additions & 0 deletions src/pages/download/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ const DownloadPage: React.FC = () => (
bungee: <PlatformIcon svg={WaterfallBungeeCordIcon} text="BungeeCord" />,
spigot: <PlatformIcon img={PaperSpigotIcon} text="Spigot/Paper" />,
velocity: <PlatformIcon img={VelocityIcon} text="Velocity" />,
fabric: <PlatformIcon img={FabricIcon} text="Fabric" />,
}}
additionalDownloads={{
fabric: {
url: "https://modrinth.com/mod/floodgate",
file: "floodgate-fabric.jar"
}
}}
/>
</TabItem>
Expand Down

0 comments on commit 50e0e60

Please sign in to comment.