diff --git a/src/components/Views/Inbox.tsx b/src/components/Views/Inbox.tsx index b3307197..07fe378b 100644 --- a/src/components/Views/Inbox.tsx +++ b/src/components/Views/Inbox.tsx @@ -60,6 +60,15 @@ const postMessage = async (msg: string) => { return response.data.createComment } +const handleGetChats = async () => { + try { + const response = await loadChats() + setChats(response as unknown as Chat[]) + } catch (error) { + console.log(error) + } +} + export const InboxView = () => { const [messages, setMessages] = createSignal([]) const [authors, setAuthors] = createSignal([]) @@ -136,15 +145,6 @@ export const InboxView = () => { formParent.dataset.replicatedValue = postMessageText() }) - const handleGetChats = async () => { - try { - const response = await loadChats() - setChats(response as unknown as Chat[]) - } catch (error) { - console.log(error) - } - } - return (