diff --git a/frontend/src/routes/searchResults/+page.svelte b/frontend/src/routes/searchResults/+page.svelte index 6b608f9..3ac84b5 100644 --- a/frontend/src/routes/searchResults/+page.svelte +++ b/frontend/src/routes/searchResults/+page.svelte @@ -11,8 +11,14 @@ let mapContainer; // DOM element to bind the map let searchResults: SearchResultsStore | null; + let imageUrl: string; + searchResultsStore.subscribe(($searchResults) => { searchResults = $searchResults; + + if (searchResults?.type === 'image') { + imageUrl = URL.createObjectURL(searchResults.image); + } }); onMount(() => { @@ -57,6 +63,15 @@
{#if searchResults} + {#if searchResults?.type === 'image'} +

Загруженное изображение

+ Search image + {#each searchResults.res.categories as category} +
+

{category.category} : {category.probability}

+
+ {/each} + {/if}

Результаты поиска

{:else}