(props: { metadata: CatalogModel })
| 1209 | } |
| 1210 | |
| 1211 | function WeightsValue(props: { metadata: CatalogModel }) { |
| 1212 | const label = weightsText(props.metadata.open_weights); |
| 1213 | const href = weightHref(props.metadata); |
| 1214 | |
| 1215 | if (label === "Open" && href) { |
| 1216 | return ( |
| 1217 | <a href={href} target="_blank" rel="noopener noreferrer"> |
| 1218 | {label} |
| 1219 | </a> |
| 1220 | ); |
| 1221 | } |
| 1222 | |
| 1223 | return <span>{label}</span>; |
| 1224 | } |
| 1225 | |
| 1226 | function weightHref(metadata: CatalogModel) { |
| 1227 | return ( |
nothing calls this directly
no test coverage detected