do not display placeholder image in edit/adding recipe

This commit is contained in:
Alexander Bocken 2024-02-18 19:58:20 +01:00
parent 794817f69d
commit cf79f75a5d
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8

View File

@ -3,11 +3,21 @@
import Cross from '$lib/assets/icons/Cross.svelte'
import "$lib/css/shake.css"
import "$lib/css/icon.css"
import { onMount } from 'svelte'
// all data shared with rest of page in card_data
export let card_data
export let image_preview_url
onMount( () => {
fetch(image_preview_url, { method: 'HEAD' })
.then(response => {
if(response.redirected){
image_preview_url = ""
}
})
})
import { img } from '$lib/js/img_store';
if(!card_data.tags){