style: Prettier format

This commit is contained in:
April Hall 2025-01-06 20:45:33 -05:00
parent d88f6e2bbf
commit 3232c21c69
Signed by: arithefirst
GPG Key ID: 4508A15C4DB91C5B
5 changed files with 17 additions and 22 deletions

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { type TypeMessage } from '../'
const { message, imageSrc, user }: TypeMessage = $props()
import { type TypeMessage } from '../';
const { message, imageSrc, user }: TypeMessage = $props();
</script>
<div class="w-full hover:bg-base-300 bg-base-200 flex py-2">

View File

@ -1,7 +1,7 @@
// place files you want to import through the `$lib` alias in this folder.
export interface TypeMessage {
message: string,
imageSrc: string,
message: string;
imageSrc: string;
user: string;
}

View File

@ -1,6 +1,6 @@
import { Server as SocketIOServer } from 'socket.io';
import type { HttpServer } from 'vite';
import { type TypeMessage } from './'
import { type TypeMessage } from './';
let io: SocketIOServer | undefined;
@ -13,14 +13,13 @@ export function startupSocketIOServer(httpServer: HttpServer | null) {
// Runs on client connect
console.log(`[ws:kit] client connected (${socket.id})`);
// Runs on message receive
socket.on('message', (msg) => {
console.log(`[ws:kit] message from ${socket.id}: ${msg}`);
io!.emit('message', {
user: socket.id,
message: msg,
imageSrc: 'https://www.arithefirst.com/images/pfp.png'
imageSrc: 'https://www.arithefirst.com/images/pfp.png',
});
});

View File

@ -50,11 +50,7 @@
</div>
<div class="col-span-1 overflow-scroll bg-base-200 m-4 rounded-lg">
{#each log as message}
<Message
imageSrc={message.imageSrc}
user={message.user}
message={message.message}
/>
<Message imageSrc={message.imageSrc} user={message.user} message={message.message} />
{/each}
</div>
</main>