style: Prettier format
This commit is contained in:
parent
016813dd56
commit
ac93c0ca4b
@ -34,7 +34,6 @@ async function getMessages(client: cassandra.Client, channelName: string, limit:
|
||||
// to be specified by EQ or IN when using ORDER BY
|
||||
res.rows.sort((a, b) => a.timestamp - b.timestamp);
|
||||
|
||||
|
||||
// For the same reason as above, we have to apply the limit manually
|
||||
// as well, because if we only query 5, but they're not properly sorted,
|
||||
// it will only return the first 5 instead of the last 5
|
||||
|
@ -6,7 +6,11 @@ export const load: PageLoad = async () => {
|
||||
const rows = await getMessages(client, '000', 5);
|
||||
const messages: TypeMessage[] = rows
|
||||
? rows.map((value) => {
|
||||
return { message: value.message_content, user: value.sender.toString(), imageSrc: `https://api.dicebear.com/9.x/identicon/svg?seed=${value.sender.toString()}` };
|
||||
return {
|
||||
message: value.message_content,
|
||||
user: value.sender.toString(),
|
||||
imageSrc: `https://api.dicebear.com/9.x/identicon/svg?seed=${value.sender.toString()}`,
|
||||
};
|
||||
})
|
||||
: [];
|
||||
return {
|
||||
|
@ -56,6 +56,6 @@
|
||||
</div>
|
||||
<form class="flex mb-2 mx-2 mt-1" onsubmit={sendMessage}>
|
||||
<input type="text" placeholder="Type here" class="input border-base-300 w-5/6 mr-1 border-2" bind:value={msg} />
|
||||
<button aria-label="send message" class="btn w-1/6 btn-primary" type="submit"><SendIcon/></button>
|
||||
<button aria-label="send message" class="btn w-1/6 btn-primary" type="submit"><SendIcon /></button>
|
||||
</form>
|
||||
</main>
|
||||
|
Loading…
Reference in New Issue
Block a user