fix: unsplash image issue

This commit is contained in:
rutik wankhade 2023-01-26 11:35:28 +05:30
parent 7ad1de1965
commit 036f788eeb
2 changed files with 5 additions and 4 deletions

View File

@ -24,10 +24,8 @@ const ComponentToImg = (props) => {
const downloadImage = async () => {
// exportComponentAsPNG(componentRef, 'cover')
// console.log(unsplashImage.downloadLink)
// unsplash.photos.trackDownload({ downloadLocation: unsplashImage.downloadLink, });
const element = componentRef.current; // You can use element's ID or Class here
const element = componentRef.current;
// console.log(element)
// console.log(element.offsetHeight)
@ -47,6 +45,9 @@ const ComponentToImg = (props) => {
await saveImage(data);
if (unsplashImage) {
unsplash.photos.trackDownload({ downloadLocation: unsplashImage.downloadLink, });
}
}

View File

@ -19,7 +19,7 @@ const StylishTheme = ({ config }) => {
query: searchText,
page: 1,
per_page: 25,
orientation:'portrait'
// orientation:'portrait'
})