mirror of https://github.com/fantasticit/think.git
fix: refresh message every 200ms
This commit is contained in:
parent
8f212d97de
commit
9d5f37820a
|
@ -13,7 +13,7 @@ export const useAllMessages = () => {
|
||||||
data: Array<IMessage>;
|
data: Array<IMessage>;
|
||||||
total: number;
|
total: number;
|
||||||
}>(`/message/all?page=${page}`, (url) => HttpClient.get(url), {
|
}>(`/message/all?page=${page}`, (url) => HttpClient.get(url), {
|
||||||
// refreshInterval: 200,
|
refreshInterval: 200,
|
||||||
});
|
});
|
||||||
const loading = !data && !error;
|
const loading = !data && !error;
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ export const useReadMessages = () => {
|
||||||
data: Array<IMessage>;
|
data: Array<IMessage>;
|
||||||
total: number;
|
total: number;
|
||||||
}>(`/message/read?page=${page}`, (url) => HttpClient.get(url), {
|
}>(`/message/read?page=${page}`, (url) => HttpClient.get(url), {
|
||||||
// refreshInterval: 200,
|
refreshInterval: 200,
|
||||||
});
|
});
|
||||||
const loading = !data && !error;
|
const loading = !data && !error;
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ export const useUnreadMessages = () => {
|
||||||
data: Array<IMessage>;
|
data: Array<IMessage>;
|
||||||
total: number;
|
total: number;
|
||||||
}>(`/message/unread?page=${page}`, (url) => HttpClient.get(url), {
|
}>(`/message/unread?page=${page}`, (url) => HttpClient.get(url), {
|
||||||
// refreshInterval: 200,
|
refreshInterval: 200,
|
||||||
});
|
});
|
||||||
const loading = !data && !error;
|
const loading = !data && !error;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue