chore: rename again
This commit is contained in:
@@ -25,7 +25,7 @@ import IconHeadphone from "../../../assets/icons/headphone.svg";
|
||||
import addIcon from "../../../assets/icons/add.svg?url";
|
||||
import {
|
||||
// StyledNotification,
|
||||
StyledContacts,
|
||||
StyledUsers,
|
||||
StyledChannelChat,
|
||||
StyledHeader
|
||||
} from "./styled";
|
||||
@@ -186,7 +186,7 @@ export default function ChannelChat({ cid = "", dropFiles = [] }) {
|
||||
users={
|
||||
membersVisible ? (
|
||||
<>
|
||||
<StyledContacts>
|
||||
<StyledUsers>
|
||||
{addVisible && (
|
||||
<div className="add" onClick={toggleAddVisible}>
|
||||
<img className="icon" src={addIcon} />
|
||||
@@ -206,7 +206,7 @@ export default function ChannelChat({ cid = "", dropFiles = [] }) {
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</StyledContacts>
|
||||
</StyledUsers>
|
||||
</>
|
||||
) : null
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ export const StyledNotification = styled.div`
|
||||
outline: none;
|
||||
}
|
||||
`;
|
||||
export const StyledContacts = styled.div`
|
||||
export const StyledUsers = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useUpdateMuteSettingMutation } from "../../../app/services/user";
|
||||
import { useReadMessageMutation } from "../../../app/services/message";
|
||||
import { removeUserSession } from "../../../app/slices/message.user";
|
||||
import ContextMenu from "../../../common/component/ContextMenu";
|
||||
import useContactOperation from "../../../common/hook/useContactOperation";
|
||||
import useUserOperation from "../../../common/hook/useUserOperation";
|
||||
|
||||
export default function SessionContextMenu({
|
||||
context = "user",
|
||||
@@ -17,7 +17,7 @@ export default function SessionContextMenu({
|
||||
setInviteChannelId,
|
||||
children
|
||||
}) {
|
||||
const { canCopyEmail, copyEmail } = useContactOperation({ uid: context == "user" ? id : null });
|
||||
const { canCopyEmail, copyEmail } = useUserOperation({ uid: context == "user" ? id : null });
|
||||
const [muteChannel] = useUpdateMuteSettingMutation();
|
||||
const [updateReadIndex] = useReadMessageMutation();
|
||||
const pathMatched = useMatch(`/chat/dm/${id}`);
|
||||
|
||||
@@ -15,7 +15,7 @@ import Tooltip from "../../common/component/Tooltip";
|
||||
import ChannelChat from "./ChannelChat";
|
||||
import DMChat from "./DMChat";
|
||||
import ChannelList from "./ChannelList";
|
||||
import ContactsModal from "../../common/component/UsersModal";
|
||||
import UsersModal from "../../common/component/UsersModal";
|
||||
import ChannelModal from "../../common/component/ChannelModal";
|
||||
import DMList from "./DMList";
|
||||
|
||||
@@ -28,10 +28,10 @@ export default function ChatPage() {
|
||||
};
|
||||
});
|
||||
const [channelModalVisible, setChannelModalVisible] = useState(false);
|
||||
const [usersModalVisible, setContactsModalVisible] = useState(false);
|
||||
const [usersModalVisible, setUsersModalVisible] = useState(false);
|
||||
const { channel_id, user_id } = useParams();
|
||||
const toggleContactsModalVisible = () => {
|
||||
setContactsModalVisible((prev) => !prev);
|
||||
const toggleUsersModalVisible = () => {
|
||||
setUsersModalVisible((prev) => !prev);
|
||||
};
|
||||
const toggleChannelModalVisible = () => {
|
||||
setChannelModalVisible((prev) => !prev);
|
||||
@@ -49,7 +49,7 @@ export default function ChatPage() {
|
||||
{channelModalVisible && (
|
||||
<ChannelModal closeModal={toggleChannelModalVisible} personal={true} />
|
||||
)}
|
||||
{usersModalVisible && <ContactsModal closeModal={toggleContactsModalVisible} />}
|
||||
{usersModalVisible && <UsersModal closeModal={toggleUsersModalVisible} />}
|
||||
<StyledWrapper>
|
||||
<div className="left">
|
||||
<Server />
|
||||
@@ -74,7 +74,7 @@ export default function ChatPage() {
|
||||
DIRECT MESSAGE
|
||||
</span>
|
||||
<Tooltip tip="New DM" placement="bottom">
|
||||
<AddIcon className="add_icon" onClick={toggleContactsModalVisible} />
|
||||
<AddIcon className="add_icon" onClick={toggleUsersModalVisible} />
|
||||
</Tooltip>
|
||||
</h3>
|
||||
<nav className="nav">
|
||||
|
||||
@@ -9,20 +9,20 @@ import Server from "../../common/component/Server";
|
||||
import CurrentUser from "../../common/component/CurrentUser";
|
||||
import ChannelChat from "./ChannelChat";
|
||||
import DMChat from "./DMChat";
|
||||
import ContactsModal from "../../common/component/UsersModal";
|
||||
import UsersModal from "../../common/component/UsersModal";
|
||||
import ChannelModal from "../../common/component/ChannelModal";
|
||||
import SessionList from "./SessionList";
|
||||
export default function ChatPage() {
|
||||
const [channelModalVisible, setChannelModalVisible] = useState(false);
|
||||
const [usersModalVisible, setContactsModalVisible] = useState(false);
|
||||
const [usersModalVisible, setUsersModalVisible] = useState(false);
|
||||
const { channel_id, user_id } = useParams();
|
||||
const { sessionUids } = useSelector((store) => {
|
||||
return {
|
||||
sessionUids: store.userMessage.ids
|
||||
};
|
||||
});
|
||||
const toggleContactsModalVisible = () => {
|
||||
setContactsModalVisible((prev) => !prev);
|
||||
const toggleUsersModalVisible = () => {
|
||||
setUsersModalVisible((prev) => !prev);
|
||||
};
|
||||
const toggleChannelModalVisible = () => {
|
||||
setChannelModalVisible((prev) => !prev);
|
||||
@@ -38,7 +38,7 @@ export default function ChatPage() {
|
||||
{channelModalVisible && (
|
||||
<ChannelModal closeModal={toggleChannelModalVisible} personal={true} />
|
||||
)}
|
||||
{usersModalVisible && <ContactsModal closeModal={toggleContactsModalVisible} />}
|
||||
{usersModalVisible && <UsersModal closeModal={toggleUsersModalVisible} />}
|
||||
<StyledWrapper>
|
||||
<div className="left">
|
||||
<Server />
|
||||
|
||||
Reference in New Issue
Block a user