File tree Expand file tree Collapse file tree 2 files changed +11
-24
lines changed
Expand file tree Collapse file tree 2 files changed +11
-24
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 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 ;
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 >
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 -->
You can’t perform that action at this time.
0 commit comments