🚫 Disable all ws for frontend (#324)

This commit is contained in:
Montassar Ghanmy
2024-01-19 17:56:09 +01:00
committed by GitHub
parent 58b5a1fcc0
commit 4769a23480
25 changed files with 8 additions and 995 deletions
@@ -1,17 +0,0 @@
import { useRealtimeRoom } from '@features/global/hooks/use-realtime';
import { useDriveActions } from './use-drive-actions';
import { useDriveItem } from './use-drive-item';
export const useDriveRealtime = (id: string) => {
const { refresh } = useDriveActions();
const { websockets } = useDriveItem(id);
const room = websockets?.[0];
useRealtimeRoom(room as { room: string; token: string }, 'useDriveRealtime-' + id, () => {
refresh(id);
});
};
export const DriveRealtimeObject = ({ id }: { id: string }) => {
useDriveRealtime(id);
return <></>;
};