feat: add more images for product

This commit is contained in:
Vlad Stan 2023-04-03 18:36:14 +03:00
parent 73016c2ce9
commit d032c8b259
8 changed files with 51 additions and 73 deletions

View file

@ -111,3 +111,13 @@ function timeFromNow(time) {
// Return time from now data
return `${tfn.time} ${tfn.unitOfTime}`
}
function isValidImageUrl(string) {
let url
try {
url = new URL(string)
} catch (_) {
return false
}
return url.protocol === 'http:' || url.protocol === 'https:'
}