mirror of
https://github.com/Fluffy-Bean/TastyBites.git
synced 2025-06-02 08:23:14 +00:00
Set image value in Item to list, to support more images in the future
Set all pages to Typescript
This commit is contained in:
parent
7d8d19a6e9
commit
9dce9235d6
16 changed files with 63 additions and 59 deletions
|
@ -1,18 +1,18 @@
|
|||
<script>
|
||||
<script lang="ts">
|
||||
import { link } from 'svelte-spa-router';
|
||||
import { Acorn, Fish, Leaf, Pepper, ArrowUpRight, GrainsSlash } from 'phosphor-svelte';
|
||||
|
||||
import { Labels } from "../lib/types";
|
||||
import { type Item, Labels} from "../lib/types";
|
||||
import LoadingImage from '/MenuItemLoadingAlt.svg';
|
||||
|
||||
export let item = {};
|
||||
export let item: Item;
|
||||
</script>
|
||||
|
||||
<div class="menu-item">
|
||||
{#if !item.image}
|
||||
<img src={LoadingImage} alt="" class="menu-item-image">
|
||||
{#if item.images}
|
||||
<img src={item.images[0]} alt="" class="menu-item-image">
|
||||
{:else}
|
||||
<img src={item.image} alt="" class="menu-item-image">
|
||||
<img src={LoadingImage} alt="" class="menu-item-image">
|
||||
{/if}
|
||||
|
||||
<div class="menu-item-header">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue