From 30fa0c4c1faece6b054105fe3cce5107f24a2fa2 Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Sun, 3 Nov 2024 15:33:43 -0500
Subject: Svelte 5: go through and use runes in components, pages, and layouts.

Does not use runes in stores (yet).
---
 ui/lib/components/Message.svelte | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

(limited to 'ui/lib/components/Message.svelte')

diff --git a/ui/lib/components/Message.svelte b/ui/lib/components/Message.svelte
index a82318a..f47e9b6 100644
--- a/ui/lib/components/Message.svelte
+++ b/ui/lib/components/Message.svelte
@@ -2,14 +2,12 @@
 	import { marked } from 'marked';
 	import DOMPurify from 'dompurify';
 
-	export let at;
-	export let body;
-
-	$: renderedBody = DOMPurify.sanitize(marked.parse(body, { breaks: true }));
-
-	let scroll = (message) => {
+	function scroll(message) {
 		message.scrollIntoView();
-	};
+	}
+
+	let { at, body } = $props();
+	let renderedBody = $derived(DOMPurify.sanitize(marked.parse(body, { breaks: true })));
 </script>
 
 <div class="message relative">
-- 
cgit v1.2.3

