🚫 Disable all ws for frontend (#324)
This commit is contained in:
@@ -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 <></>;
|
||||
};
|
||||
Reference in New Issue
Block a user