Browse Source

refac: banner newlines

Timothy Jaeryang Baek 3 months ago
parent
commit
3f800c069e
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/lib/components/common/Banner.svelte

+ 3 - 2
src/lib/components/common/Banner.svelte

@@ -36,6 +36,8 @@
 
 	onMount(() => {
 		mounted = true;
+
+		console.log('Banner mounted:', banner);
 	});
 </script>
 
@@ -82,9 +84,8 @@
 						</div>
 					{/if}
 				</div>
-
 				<div class="flex-1 text-xs text-gray-700 dark:text-white max-h-60 overflow-y-auto">
-					{@html marked.parse(DOMPurify.sanitize(banner.content))}
+					{@html marked.parse(DOMPurify.sanitize((banner?.content ?? '').replace(/\n/g, '<br>')))}
 				</div>
 			</div>