Update to svelte 5
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
<script lang="ts">
|
||||
export let path = []
|
||||
import type { FSNode } from 'lib/FilesystemAPI';
|
||||
import { run } from 'svelte/legacy';
|
||||
|
||||
let image_uri: string
|
||||
let image_link: string
|
||||
$: update_links(path)
|
||||
const update_links = (path) => {
|
||||
let { path = [] }: {path: FSNode[]} = $props();
|
||||
|
||||
let image_uri: string = $state()
|
||||
let image_link: string = $state()
|
||||
const update_links = (path: FSNode[]) => {
|
||||
image_uri = null
|
||||
image_link = null
|
||||
for (let node of path) {
|
||||
@@ -18,6 +20,9 @@ const update_links = (path) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
run(() => {
|
||||
update_links(path)
|
||||
});
|
||||
</script>
|
||||
|
||||
{#if image_uri}
|
||||
|
Reference in New Issue
Block a user