diff --git a/apps/codac-quasseln/src/pages/main-chat/[chatId].tsx b/apps/codac-quasseln/src/pages/main-chat/[chatId].tsx index 9e0ba5c5..95aaf114 100644 --- a/apps/codac-quasseln/src/pages/main-chat/[chatId].tsx +++ b/apps/codac-quasseln/src/pages/main-chat/[chatId].tsx @@ -36,7 +36,7 @@ const getChatHistoryById = gql` id attributes { pinned - messages { + messages(pagination: { page: 1, pageSize: 100 }) { data { id attributes { @@ -145,6 +145,7 @@ const updatePinnedConversation = gql` `; const SingleChat = (props: Props) => { + const [testVariable, setTestVariable] = useState(false); const { user } = useAuth(); console.log("user :>> ", user); const userId = user?.id; @@ -219,6 +220,7 @@ const SingleChat = (props: Props) => { setMessageText(""); } refetch(); + setTestVariable(!testVariable); }; // const [deleteMessageMutation] = useMutation(deleteChatMessage); @@ -286,15 +288,6 @@ const SingleChat = (props: Props) => { // +++++++++++++++++++++++ MODALS ++++++++++++++++++++++ - const [deleteModal, setDeleteModal] = useState(false); - const [optionsModal, setOptionsModal] = useState(false); - const toogleDeleteModal = () => { - setDeleteModal(!deleteModal); - }; - const toogleOptionsModal = () => { - setOptionsModal(!optionsModal); - }; - return (
*/} - <> - {user?.role?.name === "Mentor" ? ( -
updatePinned(e, conversation)} - style={{ cursor: "pointer" }} - > - X -
- ) : ( - "" - )} - > -*/} + <> + {user?.role?.name === "Mentor" ? ( +
updatePinned(e, conversation)} + style={{ cursor: "pointer" }} + > + X +
+ ) : ( + "" + )} + > +*/} - <> - {user?.role?.name === "Mentor" ? ( -
updatePinned(e, conversation)} - style={{ cursor: "pointer" }} - > - X -
- ) : ( - "" - )} - > - -*/} + <> + {user?.role?.name === "Mentor" ? ( +
updatePinned(e, conversation)} + style={{ cursor: "pointer" }} + > + X +
+ ) : ( + "" + )} + > + +