import React, { useCallback } from 'react'; import * as need from 'lib/need'; import { Grid } from 'indigo-react'; import { usePointCursor } from 'store/pointCursor'; import { useHistory } from 'store/history'; import View from 'components/View'; import Passport from 'components/Passport'; import { ForwardButton } from 'components/Buttons'; import FooterButton from 'components/FooterButton'; import { matchBlinky } from 'components/Blinky'; import useInvites from 'lib/useInvites'; import { useSyncOwnedPoints } from 'lib/useSyncPoints'; import { ROUTE_NAMES } from 'lib/routeNames'; import Actions from './Point/Actions'; export default function Point() { const history = useHistory(); const { pointCursor } = usePointCursor(); // const { pointCache } = usePointCache(); const point = need.pointCursor(pointCursor); // fetch the invites for the current cursor const { availableInvites } = useInvites(point); const availableInvitesText = matchBlinky(availableInvites); const goInvite = useCallback(() => history.push(ROUTE_NAMES.INVITE), [ history, ]); // sync the current cursor useSyncOwnedPoints([point]); return ( Admin Boot Arvo Invite {availableInvitesText} ); }