do not display placeholder image in edit/adding recipe
This commit is contained in:
parent
794817f69d
commit
cf79f75a5d
@ -3,11 +3,21 @@
|
|||||||
import Cross from '$lib/assets/icons/Cross.svelte'
|
import Cross from '$lib/assets/icons/Cross.svelte'
|
||||||
import "$lib/css/shake.css"
|
import "$lib/css/shake.css"
|
||||||
import "$lib/css/icon.css"
|
import "$lib/css/icon.css"
|
||||||
|
import { onMount } from 'svelte'
|
||||||
|
|
||||||
// all data shared with rest of page in card_data
|
// all data shared with rest of page in card_data
|
||||||
export let card_data
|
export let card_data
|
||||||
export let image_preview_url
|
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';
|
import { img } from '$lib/js/img_store';
|
||||||
|
|
||||||
if(!card_data.tags){
|
if(!card_data.tags){
|
||||||
|
Loading…
Reference in New Issue
Block a user