bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/notes/hooks/useNotesLastRev.ts
2024-05-01 09:39:03 -03:00

17 lines
376 B
TypeScript

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;