1import { useEffect, useMemo, useState } from 'react';
2import * as need from 'lib/need';
3import { usePointCache } from 'store/pointCache';
4import { usePointCursor } from 'store/pointCursor';
5import { convertToInt } from 'lib/convertToInt';
7export const useHasNetworkKeysSet = () => {
8 const { pointCursor } = usePointCursor();
9 const { getDetails } = usePointCache();
10 const point = pointCursor.getOrElse(null);
11 const [networkKeysSet, setNetworkKeysSet] = useState<boolean>(true);
15 const details = need.details(getDetails(point));
16 const networkRevision = convertToInt(details.keyRevisionNumber, 10);
17 setNetworkKeysSet(networkRevision > 0);
19 }, [getDetails, point, pointCursor]);
21 return useMemo(() => {
22 return networkKeysSet;
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