1import { useCallback } from 'react';
3import useDetailsStore from './useDetailsStore';
4import useBirthdaysStore from './useBirthdaysStore';
5import useInvitesStore from './useInvitesStore';
6import useControlledPointsStore from './useControlledPointsStore';
7import useEclipticOwnerStore from './useEclipticOwnerStore';
9export default function usePointStore() {
10 const { syncDetails, ...details } = useDetailsStore();
11 const { syncBirthday, ...birthdays } = useBirthdaysStore();
12 const { syncInvites, ...invites } = useInvitesStore();
13 const ecliptic = useEclipticOwnerStore();
17 } = useControlledPointsStore();
19 // sync all of the on-chain info required to display a known point
20 const syncKnownPoint = useCallback(
21 async point => Promise.all([syncBirthday(point)]),
25 // sync all of the on-chain info required to display a foreign point
26 const syncForeignPoint = useCallback(async point => Promise.all([]), []);
28 // sync all of the on-chain info required for a point that the user owns
29 const syncOwnedPoint = useCallback(
32 syncKnownPoint(point),
36 [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