From 6213bebda2203c780041f0fb66bbcc8663e02ec0 Mon Sep 17 00:00:00 2001 From: gofnnp Date: Tue, 12 Sep 2023 06:54:00 +0400 Subject: [PATCH] fix: download image --- src/api/resources/Assets.ts | 1 + src/components/HomePage/index.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api/resources/Assets.ts b/src/api/resources/Assets.ts index 1ccaa7e..2af5a00 100644 --- a/src/api/resources/Assets.ts +++ b/src/api/resources/Assets.ts @@ -18,6 +18,7 @@ export interface Response { export interface Asset { id: string url: string + key: string asset_data: AssetData } diff --git a/src/components/HomePage/index.tsx b/src/components/HomePage/index.tsx index 4eeb44f..b96feea 100644 --- a/src/components/HomePage/index.tsx +++ b/src/components/HomePage/index.tsx @@ -86,7 +86,7 @@ function HomePage(): JSX.Element { const downloadImg = () => { if( !asset ) return; - download(asset.url.replace('http://', 'https://'), 'image.png'); + download(asset.url, 'image.png'); } return (