bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/pads/pads-graphql/sessions/component.tsx
Tainan Felipe 3bc40df230
Add: useDeduplicatedSubscription hook (#20376)
* Add: useDeduplicatedSubscription hook

* Fix: TS error

* Add: components using useDeduplicatedSubscription

* Change: Move to useDeduplicatedSubscription

* Change: unsubscribe logic to own useEffect

* Change: remove file import over package

* Fix: TS errors

* Fix: private chat not loading

* Change: revert changes on queries

* Fix: eslint error

* Remove: html-webpack-plugin package

* Fix: external video

* Add: comment about the stringToHash function

* Fix: video player showing tools over presentation
2024-06-04 10:40:54 -03:00

20 lines
659 B
TypeScript

import { PAD_SESSION_SUBSCRIPTION, PadSessionSubscriptionResponse } from './queries';
import Service from './service';
import useDeduplicatedSubscription from '/imports/ui/core/hooks/useDeduplicatedSubscription';
const PadSessionContainerGraphql = () => {
const { data: padSessionData } = useDeduplicatedSubscription<PadSessionSubscriptionResponse>(
PAD_SESSION_SUBSCRIPTION,
);
if (padSessionData) {
const sessions = new Set<string>();
padSessionData.sharedNotes_session.forEach((session) => sessions.add(session.sessionId));
Service.setCookie(Array.from(sessions));
}
return null;
};
export default PadSessionContainerGraphql;