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

17 lines
376 B
TypeScript
Raw Normal View History

import { useCallback } from 'react';
import { makeVar, useReactiveVar } from '@apollo/client';
const notesLastRev = makeVar(0);
const useNotesLastRev = () => {
const lastRev = useReactiveVar(notesLastRev);
const setNotesLastRev = useCallback((rev: number) => notesLastRev(rev), []);
return {
lastRev,
setNotesLastRev,
};
};
export default useNotesLastRev;