📁 Changed TDrive root folder (#16)

📁 Changed TDrive root folder
This commit is contained in:
Montassar Ghanmy
2023-04-11 10:04:29 +01:00
committed by GitHub
parent 3b3f67af07
commit e0615fa867
10548 changed files with 48 additions and 48 deletions
@@ -0,0 +1,17 @@
import { useRealtimeRoom } from 'app/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 <></>;
};