diff --git a/frontend/src/components/Messages.jsx b/frontend/src/components/Messages.jsx index 2bc68e9..3ad61c3 100644 --- a/frontend/src/components/Messages.jsx +++ b/frontend/src/components/Messages.jsx @@ -1,40 +1,45 @@ import { Button, Col, Form } from 'react-bootstrap'; import { ArrowRightSquare } from 'react-bootstrap-icons'; +import { useGetMessagesQuery } from '../api/messagesApi'; -const Messages = () => ( - -
-
-

- #general -

- 0 сообщений -
-
- Сообщения -
-
-
- - - - -
-
-
- -); +const Messages = () => { + const { data: messages = [] } = useGetMessagesQuery(); + console.log(messages); + return ( + +
+
+

+ #general +

+ 0 сообщений +
+
+ Сообщения +
+
+
+ + + + +
+
+
+ + ); +}; export default Messages;