Remove the automatic refreshing interval when in message tree (#1353)

Co-authored-by: Jonathan Fritz <fritz@nosc.io>
This commit is contained in:
chronikum
2023-02-08 18:31:11 +01:00
committed by GitHub
co-authored by Jonathan Fritz
parent c66c0249ed
commit d35220c702
+1 -3
View File
@@ -15,9 +15,7 @@ const MessageDetail = ({ id }: InferGetServerSidePropsType<typeof getServerSideP
const { t } = useTranslation(["message", "common"]);
const backgroundColor = useColorModeValue("white", "gray.800");
const { isLoading: isLoadingParent, data: parent } = useSWRImmutable<Message>(`/api/messages/${id}/parent`, get, {
refreshInterval: 30 * 1000, // 30 seconds
});
const { isLoading: isLoadingParent, data: parent } = useSWRImmutable<Message>(`/api/messages/${id}/parent`, get);
if (isLoadingParent) {
return <MessageLoading />;