2023-03-30 15:15:54 +02:00
|
|
|
import React, { useState } from "react";
|
|
|
|
import "./style.css";
|
|
|
|
|
|
|
|
import ChatBoxProps from "./ChatBoxProps.js";
|
|
|
|
import ChatButton from "./ChatButton.js";
|
|
|
|
|
|
|
|
const ChatBox = (props) => {
|
2023-04-19 17:03:48 +02:00
|
|
|
const { updateNeedForm, messages, updateMessages, token } = props.props;
|
2023-03-30 15:15:54 +02:00
|
|
|
const [visible, setVisible] = useState(false);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="container">
|
|
|
|
<div className="chatbox">
|
|
|
|
<ChatBoxProps
|
2023-04-19 17:03:48 +02:00
|
|
|
props={{ visible, updateNeedForm, messages, updateMessages, token }}
|
2023-03-30 15:15:54 +02:00
|
|
|
/>
|
|
|
|
<ChatButton onClick={() => setVisible(!visible)} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default ChatBox;
|
|
|
|
|