refac
This commit is contained in:
1 parent
9550731cc1
commit
76d0160295
1 file changed
+4
-7
@@ -10,7 +10,7 @@
|
|||||||
dayjs.extend(isYesterday);
|
dayjs.extend(isYesterday);
|
||||||
dayjs.extend(localizedFormat);
|
dayjs.extend(localizedFormat);
|
||||||
|
|
||||||
import { getContext, onMount } from 'svelte';
|
import { getContext } from 'svelte';
|
||||||
const i18n = getContext<Writable<i18nType>>('i18n');
|
const i18n = getContext<Writable<i18nType>>('i18n');
|
||||||
|
|
||||||
import { formatDate } from '$lib/utils';
|
import { formatDate } from '$lib/utils';
|
||||||
@@ -146,11 +146,9 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
onMount(async () => {
|
$: if (message?.data === true) {
|
||||||
if (message && message?.data === true) {
|
loadMessageData();
|
||||||
await loadMessageData();
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$: messageOutput = Array.isArray(message?.data?.output) ? message.data.output : [];
|
$: messageOutput = Array.isArray(message?.data?.output) ? message.data.output : [];
|
||||||
$: hasStructuredOutput = buildOutputDisplayItems(messageOutput).length > 0;
|
$: hasStructuredOutput = buildOutputDisplayItems(messageOutput).length > 0;
|
||||||
@@ -454,7 +452,6 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if message?.data === true}
|
{#if message?.data === true}
|
||||||
<!-- loading indicator -->
|
|
||||||
<div class=" my-2">
|
<div class=" my-2">
|
||||||
<Skeleton />
|
<Skeleton />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user