Effort to transition to TypeScript

Remove commit warnings
This commit is contained in:
Michał Gdula 2024-05-02 19:10:21 +01:00
parent 4f0ecd33e4
commit 1486c1b70a
18 changed files with 93 additions and 87 deletions

View file

@ -1,5 +1,5 @@
<script>
import { getAnnouncements } from '%/lib/test-api.ts';
import { getAnnouncements } from '../lib/test-api';
let announcement = getAnnouncements();
</script>
@ -16,7 +16,7 @@
{/await}
<style lang="scss">
@import "%/styles/vars";
@import "../styles/vars";
$padding: 1px;

View file

@ -18,7 +18,7 @@
</div>
<style lang="scss">
@import "%/styles/vars";
@import "../styles/vars";
.dropdown {
border-bottom: 1px solid transparent;

View file

@ -1,7 +1,8 @@
<script>
import { link } from 'svelte-spa-router';
import { Acorn, Fish, Leaf, Pepper, ArrowUpRight, GrainsSlash } from 'phosphor-svelte';
import { Labels } from "../lib/types";
import LoadingImage from '/MenuItemLoadingAlt.svg';
export let item = {};
@ -17,19 +18,15 @@
<div class="menu-item-header">
<ul>
{#each item.labels as label}
{#if label === "vegan"}
{#if label === Labels.vegan}
<li class="vegan"><Leaf weight="fill" /></li>
{/if}
{#if label === "fish"}
{:else if label === Labels.fish}
<li class="fish"><Fish weight="fill" /></li>
{/if}
{#if label === "nut"}
{:else if label === Labels.nut}
<li class="nut"><Acorn weight="fill" /></li>
{/if}
{#if label === "gluten"}
{:else if label === Labels.gluten}
<li class="gluten"><GrainsSlash weight="fill" /></li>
{/if}
{#if label === "spicy"}
{:else if label === Labels.spicy}
<li class="spicy"><Pepper weight="fill" /></li>
{/if}
{/each}

View file

@ -1,5 +1,5 @@
<script>
import MenuItem from "%/components/MenuItem.svelte";
import MenuItem from "./MenuItem.svelte";
export let items = [];
</script>