1import { useEffect } from 'react';
3// via https:// usehooks.com/useOnClickOutside/
4export default function useOnClickOutside(ref, handler) {
6 const listener = event => {
7 // Do nothing if clicking ref's element or descendent elements
8 if (!ref.current || ref.current.contains(event.target)) {
15 document.addEventListener('mousedown', listener);
16 document.addEventListener('touchstart', listener);
19 document.removeEventListener('mousedown', listener);
20 document.removeEventListener('touchstart', listener);
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list