🐛 Fix relative path in app

This commit is contained in:
Rune Harlyk
2025-10-20 20:34:33 +02:00
parent b14f005b22
commit 64ef3d31eb
7 changed files with 18 additions and 8 deletions
+2 -1
View File
@@ -1,8 +1,9 @@
<script lang="ts">
import { page } from '$app/state'
import { resolve } from '$app/paths'
</script>
<div class="flex justify-center items-center w-full h-full">
<h1>{page.status} {page.error?.message}</h1>
<span>Go to <a class="btn btn-primary" href="/">Home page</a></span>
<span>Go to <a class="btn btn-primary" href={resolve('/')}>Home page</a></span>
</div>
+3 -2
View File
@@ -3,11 +3,12 @@
import Visualization from '$lib/components/Visualization.svelte'
import { socket } from '$lib/stores'
import { onMount } from 'svelte'
import { resolve } from '$app/paths'
onMount(() => {
socket.subscribe(isConnected => {
if (isConnected) {
goto('/controller')
goto(resolve('/controller'))
}
})
})
@@ -21,7 +22,7 @@
<div class="card-body w-80">
<h2 class="card-title text-center text-2xl">Begin you journey</h2>
<p class="py-6 text-center"></p>
<a class="btn btn-primary" href={$socket ? '/controller' : '/connection'}>
<a class="btn btn-primary" href={resolve($socket ? '/controller' : '/connection')}>
Add Robot Dog
</a>
</div>
+2 -1
View File
@@ -1,7 +1,8 @@
import type { PageLoad } from './$types'
import { goto } from '$app/navigation'
import { resolve } from '$app/paths'
export const load = (async () => {
goto('/')
goto(resolve('/'))
return
}) satisfies PageLoad
+2 -1
View File
@@ -1,7 +1,8 @@
import type { PageLoad } from './$types'
import { goto } from '$app/navigation'
import { resolve } from '$app/paths'
export const load = (async () => {
goto('/')
goto(resolve('/'))
return
}) satisfies PageLoad
+2 -1
View File
@@ -1,7 +1,8 @@
import type { PageLoad } from './$types'
import { goto } from '$app/navigation'
import { resolve } from '$app/paths'
export const load = (async () => {
goto('/')
goto(resolve('/'))
return
}) satisfies PageLoad