Skip to content

Commit ac265f9

Browse files
committed
now a change to the result card for streams so the link works with the goto store, PACKAGE
1 parent ccae55b commit ac265f9

File tree

2 files changed

+11
-24
lines changed

2 files changed

+11
-24
lines changed

renderer/.routify/sitemap.default.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.

renderer/src/lib/components/StreamResultCard.svelte

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import { getMediaFilePath } from '$lib/utils/utils';
33
import type { SearchRow } from '$lib/types/general-types';
44
import { getContext } from 'svelte';
5-
import { goto } from '@roxi/routify';
6-
import { get } from 'svelte/store';
5+
import { url, goto } from '@roxi/routify';
6+
// import { get } from 'svelte/store';
77
88
interface Props {
99
row: SearchRow;
@@ -18,18 +18,17 @@
1818
}
1919
2020
const filePath = getMediaFilePath(mediaDir, row.fileHash);
21-
const link = `/tagging/${row.fileHash}?fileType=${encodeURIComponent(row.fileType)}`;
21+
const link = $url(
22+
'/tagging/[slug]',
23+
{ slug: row.fileHash, fileType: row.fileType } // query part added automatically
24+
);
2225
23-
const navigate = get(goto);
26+
const go = $goto;
2427
2528
function open() {
26-
navigate(
27-
'/tagging/[slug]',
28-
{
29-
slug: row.fileHash,
30-
fileType: row.fileType
31-
}
32-
);
29+
30+
go('/tagging/[slug]', { slug: row.fileHash, fileType: row.fileType });
31+
3332
}
3433
3534
</script>
@@ -42,7 +41,7 @@
4241

4342

4443
<!-- svelte-ignore event_directive_deprecated -->
45-
<a href={link} class="result-card mb-3">
44+
<a href={link} class="result-card mb-3">
4645

4746
{#if row.fileType.startsWith('image/')}
4847
<!-- svelte-ignore a11y_img_redundant_alt -->

0 commit comments

Comments
 (0)