Skip to content

Commit

Permalink
Remove the automatic refreshing interval when in message tree (#1353)
Browse files Browse the repository at this point in the history
Co-authored-by: Jonathan Fritz <fritz@nosc.io>
  • Loading branch information
chronikum and uyewshrdjklnf committed Feb 8, 2023
1 parent c66c024 commit d35220c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions website/src/pages/messages/[id]/index.tsx
Expand Up @@ -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 />;
Expand Down

0 comments on commit d35220c

Please sign in to comment.