import React, { Fragment } from "react"; import { Descriptions, Grid, Typography } from "antd"; import ExclamationCircleOutlined from "@ant-design/icons/ExclamationCircleOutlined"; import * as lib from "@clusterio/lib"; const { useBreakpoint } = Grid; export default function ModDetails(props) { let screens = useBreakpoint(); const mod = props.mod; return {mod.error && Error} span={2}> {mod.error === "missing" && "The given version of this mod is missing from the controller storage."} {mod.error === "bad_checksum" && "Checksum of the mod in the controller storage does not match the checksum provided " + "by this mod pack." } } {props.actions && !screens.lg && {props.actions(mod)} } {mod.title && {mod.title}} {mod.version && {mod.version}} {mod.description && {mod.description} } {mod.author && {mod.author}} {`https://mods.factorio.com/mod/${mod.name}`} {mod.contact && {mod.contact}} {mod.homepage && {mod.homepage}} {mod.name} {mod.factorioVersion && {mod.factorioVersion} } {mod.filename && {mod.filename}} {mod.size !== undefined && {lib.formatBytes(mod.size)} } {mod.sha1 && {mod.sha1}} {mod.dependencies && mod.dependencies.length && {mod.dependencies .filter(e => !e.startsWith("(?)")) .map((e, i) => {e}
) }
}
; }