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