Skip to content

Commit eac1442

Browse files
authored
Merge pull request #1559 from scroll-tech/brandkit-download
fix: download link
2 parents d6004a1 + 4faf327 commit eac1442

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/app/brand-kit/Assets/AssetCard.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,13 @@ const AssetCard = props => {
262262
<Box className={classes.downloadBox}>
263263
<Typography className={classes.downloadButtons}>
264264
{Object.keys(version.formats).map((format, index) => (
265-
<a key={index} href={version.formats[format].src} download style={{ textTransform: "uppercase", cursor: "pointer" }}>
265+
<a
266+
key={index}
267+
href={version.formats[format].src ?? version.formats[format]}
268+
download
269+
target={format === "pdf" ? "_blank" : "_self"}
270+
style={{ textTransform: "uppercase", cursor: "pointer" }}
271+
>
266272
{format} <SvgIcon sx={{ fontSize: "1.7rem" }} component={DownloadIcon} inheritViewBox />
267273
</a>
268274
))}

0 commit comments

Comments
 (0)