-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement stock viewing functionalities
- Loading branch information
1 parent
643e652
commit 3b9616a
Showing
6 changed files
with
78 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,30 @@ | ||
<script lang="ts"> | ||
import { push } from 'svelte-spa-router'; | ||
import Tag from './Tag.svelte'; | ||
export let tags: string[]; | ||
export let tags: any; | ||
export let title: string; | ||
</script> | ||
|
||
<div class="mt-[30px]"> | ||
<h1 class="text-lg">{title}</h1> | ||
<div class="mt-[50px]"> | ||
<h1 class="text-xl font-bold">{title}</h1> | ||
<div class="w-full flex items-center justify-between flex-wrap"> | ||
{#each tags as tag} | ||
<Tag>{tag}</Tag> | ||
{/each} | ||
{#await tags} | ||
<h1>Loading....</h1> | ||
{:then tags} | ||
{#if tags.length == 0} | ||
<p class="font-light">No available results!</p> | ||
{:else} | ||
{#each tags as tag} | ||
<Tag | ||
on:click={() => { | ||
push( | ||
`/medicine/${tag.chemicalName}?name=${tag.name}` | ||
); | ||
}}>{tag.name}</Tag | ||
> | ||
{/each} | ||
{/if} | ||
{/await} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters