fix: share chat modal

This commit is contained in:
Timothy J. Baek 2024-04-03 19:45:08 -07:00
parent 000bea84ae
commit bfd066cc2f

View file

@ -54,12 +54,16 @@
export let show = false;
onMount(async () => {
chatId.subscribe(async (value) => {
chat = await getChatById(localStorage.token, value);
console.log(chat);
});
});
$: if (show) {
(async () => {
if ($chatId) {
chat = await getChatById(localStorage.token, $chatId);
} else {
chat = null;
console.log(chat);
}
})();
}
</script>
<Modal bind:show size="sm">