Add floodgate fabric back to downloads page

This commit is contained in:
rtm516 committed 2024-07-30 11:12:37 +01:00
1 parent 6bd98ee9b8
commit 50e0e601ce
2 files changed
+23 -1

No files matched your search

+16 -1
View File
@@ -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: '',
@@ -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>