1import { useCallback } from 'react';
3import useDetailsStore from './useDetailsStore';
4import useBirthdaysStore from './useBirthdaysStore';
5import useRekeyDateStore from './useRekeyDateStore';
6import useInvitesStore from './useInvitesStore';
7import useControlledPointsStore from './useControlledPointsStore';
8import useEclipticOwnerStore from './useEclipticOwnerStore';
10export default function usePointStore() {
11 const { syncDetails, ...details } = useDetailsStore();
12 const { syncBirthday, ...birthdays } = useBirthdaysStore();
13 const { syncRekeyDate, ...rekeyDates } = useRekeyDateStore();
14 const { syncInvites, ...invites } = useInvitesStore();
18 } = useControlledPointsStore();
19 const ecliptic = useEclipticOwnerStore();
21 // sync all of the on-chain info required to display a known point
22 const syncKnownPoint = useCallback(
23 async point => Promise.all([syncBirthday(point), syncRekeyDate(point)]),
24 [syncBirthday, syncRekeyDate]
27 // sync all of the on-chain info required to display a foreign point
28 const syncForeignPoint = useCallback(async point => {}, []);
30 // sync all of the on-chain info required for a point that the user owns
31 const syncOwnedPoint = useCallback(
34 syncForeignPoint(point),
35 syncKnownPoint(point),
40 [syncForeignPoint, syncKnownPoint, syncDetails, syncInvites]
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