make the chat button actually work

This commit is contained in:
Grant 2024-06-03 18:41:53 -06:00
parent 235bc0b6ca
commit 28cadf07ee
2 changed files with 16 additions and 2 deletions

View File

@ -0,0 +1,8 @@
# where the backend is located
VITE_API_HOST=http://localhost:3000
# what homeserver hosts the matrix users
VITE_MATRIX_HOST=aftermath.gg
# what hostname does the element instance run on
VITE_ELEMENT_HOST=https://chat.fediverse.events

View File

@ -1,4 +1,4 @@
import { Badge, Button } from "@nextui-org/react"; import { Badge, Button, Link } from "@nextui-org/react";
import { useChatContext } from "../../contexts/ChatContext"; import { useChatContext } from "../../contexts/ChatContext";
const OpenChatButton = () => { const OpenChatButton = () => {
@ -11,7 +11,13 @@ const OpenChatButton = () => {
color="danger" color="danger"
size="sm" size="sm"
> >
<Button>Chat</Button> <Button
as={Link}
href={import.meta.env.VITE_ELEMENT_HOST!}
target="_blank"
>
Chat
</Button>
</Badge> </Badge>
); );
}; };