more wiring up of messages

This commit is contained in:
Samuel Andert
2023-07-21 14:16:42 +02:00
parent 6c691c7be3
commit 5be272d1f2
7 changed files with 63 additions and 34 deletions

View File

@ -1,5 +1,5 @@
<script>
import { messages, clearMessages, addRandomMessage } from '$lib/services/messages';
import { messages } from '$lib/services/messages';
</script>
<main class="p-4 flex flex-col-reverse overflow-y-auto h-[calc(100vh-70px)]">
@ -13,18 +13,3 @@
{/each}
</div>
</main>
<footer class="fixed bottom-0 left-0 right-0 bg-white p-4 flex justify-end">
<button
class="bg-red-500 hover:bg-red-600 text-white py-2 px-4 rounded mr-2"
on:click={clearMessages}
>
Clear
</button>
<button
class="bg-blue-500 hover:bg-blue-600 text-white py-2 px-4 rounded"
on:click={addRandomMessage}
>
Send Random Message
</button>
</footer>