mirror of
https://github.com/woodchen-ink/CoverView.git
synced 2025-07-18 14:01:56 +08:00
fix: unsplash image issue
This commit is contained in:
parent
7ad1de1965
commit
036f788eeb
@ -24,10 +24,8 @@ const ComponentToImg = (props) => {
|
|||||||
|
|
||||||
const downloadImage = async () => {
|
const downloadImage = async () => {
|
||||||
// exportComponentAsPNG(componentRef, 'cover')
|
// exportComponentAsPNG(componentRef, 'cover')
|
||||||
// console.log(unsplashImage.downloadLink)
|
|
||||||
|
|
||||||
// unsplash.photos.trackDownload({ downloadLocation: unsplashImage.downloadLink, });
|
const element = componentRef.current;
|
||||||
const element = componentRef.current; // You can use element's ID or Class here
|
|
||||||
|
|
||||||
// console.log(element)
|
// console.log(element)
|
||||||
// console.log(element.offsetHeight)
|
// console.log(element.offsetHeight)
|
||||||
@ -47,6 +45,9 @@ const ComponentToImg = (props) => {
|
|||||||
await saveImage(data);
|
await saveImage(data);
|
||||||
|
|
||||||
|
|
||||||
|
if (unsplashImage) {
|
||||||
|
unsplash.photos.trackDownload({ downloadLocation: unsplashImage.downloadLink, });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ const StylishTheme = ({ config }) => {
|
|||||||
query: searchText,
|
query: searchText,
|
||||||
page: 1,
|
page: 1,
|
||||||
per_page: 25,
|
per_page: 25,
|
||||||
orientation:'portrait'
|
// orientation:'portrait'
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user