Spaces:
Sleeping
Sleeping
fix: remove legacy run in `conversation/[id]/+page.svelte`
Browse files
src/routes/conversation/[id]/+page.svelte
CHANGED
|
@@ -1,12 +1,10 @@
|
|
| 1 |
<script lang="ts">
|
| 2 |
-
import { run } from "svelte/legacy";
|
| 3 |
-
|
| 4 |
import ChatWindow from "$lib/components/chat/ChatWindow.svelte";
|
| 5 |
import { pendingMessage } from "$lib/stores/pendingMessage";
|
| 6 |
import { isAborted } from "$lib/stores/isAborted";
|
| 7 |
import { onMount } from "svelte";
|
| 8 |
import { page } from "$app/state";
|
| 9 |
-
import { goto, invalidateAll } from "$app/navigation";
|
| 10 |
import { base } from "$app/paths";
|
| 11 |
import { shareConversation } from "$lib/shareConversation";
|
| 12 |
import { ERROR_MESSAGES, error } from "$lib/stores/errors";
|
|
@@ -464,9 +462,13 @@
|
|
| 464 |
}
|
| 465 |
});
|
| 466 |
|
| 467 |
-
|
| 468 |
-
page.params.id
|
|
|
|
|
|
|
|
|
|
| 469 |
});
|
|
|
|
| 470 |
let title = $derived(
|
| 471 |
conversations.find((conv) => conv.id === page.params.id)?.title ?? data.title
|
| 472 |
);
|
|
|
|
| 1 |
<script lang="ts">
|
|
|
|
|
|
|
| 2 |
import ChatWindow from "$lib/components/chat/ChatWindow.svelte";
|
| 3 |
import { pendingMessage } from "$lib/stores/pendingMessage";
|
| 4 |
import { isAborted } from "$lib/stores/isAborted";
|
| 5 |
import { onMount } from "svelte";
|
| 6 |
import { page } from "$app/state";
|
| 7 |
+
import { beforeNavigate, goto, invalidateAll } from "$app/navigation";
|
| 8 |
import { base } from "$app/paths";
|
| 9 |
import { shareConversation } from "$lib/shareConversation";
|
| 10 |
import { ERROR_MESSAGES, error } from "$lib/stores/errors";
|
|
|
|
| 462 |
}
|
| 463 |
});
|
| 464 |
|
| 465 |
+
beforeNavigate(() => {
|
| 466 |
+
if (page.params.id) {
|
| 467 |
+
$isAborted = true;
|
| 468 |
+
loading = false;
|
| 469 |
+
}
|
| 470 |
});
|
| 471 |
+
|
| 472 |
let title = $derived(
|
| 473 |
conversations.find((conv) => conv.id === page.params.id)?.title ?? data.title
|
| 474 |
);
|