Read research ID from SvelteKit route params
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { onDestroy, onMount } from 'svelte';
|
import { onDestroy, onMount } from 'svelte';
|
||||||
|
import { page } from '$app/stores';
|
||||||
import { getResearchStatus, getResearchDetail, stopResearch, deleteResearch } from '$lib/research-api';
|
import { getResearchStatus, getResearchDetail, stopResearch, deleteResearch } from '$lib/research-api';
|
||||||
import { getApiKey } from '$lib/auth';
|
import { getApiKey } from '$lib/auth';
|
||||||
import { pollingInterval, pollingActive } from '$lib/stores';
|
import { pollingInterval, pollingActive } from '$lib/stores';
|
||||||
@@ -16,7 +17,7 @@
|
|||||||
import { errorBanners } from '$lib/components/ErrorBannerStore';
|
import { errorBanners } from '$lib/components/ErrorBannerStore';
|
||||||
import type { ErrorType } from '$lib/components/ErrorBannerStore';
|
import type { ErrorType } from '$lib/components/ErrorBannerStore';
|
||||||
|
|
||||||
export let researchId: string;
|
$: researchId = $page.params.id;
|
||||||
|
|
||||||
let detail: ResearchDetail | null = null;
|
let detail: ResearchDetail | null = null;
|
||||||
let statusText = '';
|
let statusText = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user