feat: message reply
This commit is contained in:
@@ -113,9 +113,11 @@ export default function ChannelChat({
|
||||
unread,
|
||||
removed = false,
|
||||
edited,
|
||||
reply,
|
||||
} = msg;
|
||||
return (
|
||||
<Message
|
||||
reply={reply}
|
||||
edited={edited}
|
||||
likes={likes}
|
||||
removed={removed}
|
||||
|
||||
@@ -86,9 +86,11 @@ export default function DMChat({ uid = "", dropFiles = [] }) {
|
||||
pending = false,
|
||||
removed = false,
|
||||
edited,
|
||||
reply,
|
||||
} = msg;
|
||||
return (
|
||||
<Message
|
||||
reply={reply}
|
||||
likes={likes}
|
||||
edited={edited}
|
||||
removed={removed}
|
||||
|
||||
@@ -43,7 +43,7 @@ export default function HomePage() {
|
||||
<div className={`col left ${menuExpand ? "expand" : ""}`}>
|
||||
<ServerDropList
|
||||
data={data?.server}
|
||||
memberCount={data?.metrics?.user_count}
|
||||
memberCount={data.contacts?.length}
|
||||
expand={menuExpand}
|
||||
/>
|
||||
<nav className="nav">
|
||||
|
||||
@@ -7,10 +7,7 @@ import { clearAuthData, setUserData } from "../../app/slices/auth.data";
|
||||
import { setContacts } from "../../app/slices/contacts";
|
||||
|
||||
// import { useGetChannelsQuery } from "../../app/services/channel";
|
||||
import {
|
||||
useLazyGetServerQuery,
|
||||
useLazyGetMetricsQuery,
|
||||
} from "../../app/services/server";
|
||||
import { useLazyGetServerQuery } from "../../app/services/server";
|
||||
import { KEY_UID } from "../../app/config";
|
||||
// pollingInterval: 0,
|
||||
// const querySetting = {
|
||||
@@ -39,15 +36,6 @@ export default function usePreload() {
|
||||
data: server,
|
||||
},
|
||||
] = useLazyGetServerQuery();
|
||||
const [
|
||||
getMetrics,
|
||||
{
|
||||
isLoading: metricsLoading,
|
||||
isSuccess: metricsSuccess,
|
||||
isError: metricsError,
|
||||
data: metrics,
|
||||
},
|
||||
] = useLazyGetMetricsQuery();
|
||||
useEffect(() => {
|
||||
initCache();
|
||||
rehydrate();
|
||||
@@ -55,7 +43,6 @@ export default function usePreload() {
|
||||
useEffect(() => {
|
||||
getContacts();
|
||||
getServer();
|
||||
getMetrics();
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -77,18 +64,12 @@ export default function usePreload() {
|
||||
}
|
||||
}, [contacts]);
|
||||
return {
|
||||
loading:
|
||||
contactsLoading ||
|
||||
serverLoading ||
|
||||
metricsLoading ||
|
||||
!checked ||
|
||||
!cacheFirst,
|
||||
error: contactsError && serverError && metricsError,
|
||||
success: contactsSuccess && serverSuccess && metricsSuccess,
|
||||
loading: contactsLoading || serverLoading || !checked || !cacheFirst,
|
||||
error: contactsError && serverError,
|
||||
success: contactsSuccess && serverSuccess,
|
||||
data: {
|
||||
contacts,
|
||||
server,
|
||||
metrics,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user