bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/notes/notes-graphql/hooks/useHasUnreadNotes.ts

14 lines
394 B
TypeScript

import { Meteor } from 'meteor/meteor';
import useRev from '/imports/ui/components/pads/pads-graphql/hooks/useRev';
import useNotesLastRev from './useNotesLastRev';
const NOTES_CONFIG = Meteor.settings.public.notes;
const useHasUnreadNotes = () => {
const { lastRev } = useNotesLastRev();
const rev = useRev(NOTES_CONFIG.id);
return rev > lastRev;
};
export default useHasUnreadNotes;