@@ -25,7 +25,7 @@ const isPlanet = point =>
2525 azimuth.getPointSize(point) === azimuth.PointSize.Planet;
2626
2727export default function Point() {
28− const history = useHistory();
28+ const { push, names } = useHistory();
2929 const { pointCursor } = usePointCursor();
3030 const { wallet } = useWallet();
3131
@@ -45,17 +45,19 @@ export default function Point() {
4545
4646 const showActions = Just.hasInstance(wallet);
4747
48− const goAdmin = useCallback(() => history.push(ROUTE_NAMES.ADMIN), [history]);
48+ const goAdmin = useCallback(() => push(names.ADMIN), [history, names]);
4949
50− const goInvite = useCallback(() => history.push(ROUTE_NAMES.INVITE), [
50+ const goInvite = useCallback(() => push(names.INVITE), [history, names]);
51+
52+ const goParties = useCallback(() => push(names.INVITES_MANAGE), [
5153 history,
54+ names,
5255 ]);
5356
54− const inviteButton = useMemo(() => {
57+ const inviteButton = (() => {
5558 switch (azimuth.getPointSize(point)) {
5659 case azimuth.PointSize.Planet:
5760 const availableInvitesText = matchBlinky(availableInvites);
58− const goInvite = () => history.push(ROUTE_NAMES.INVITE);
5961 return (
6062 <FooterButton disabled={!isOwner} onClick={goInvite}>
6163 Invite <sup>{availableInvitesText} available</sup>
@@ -63,7 +65,6 @@ export default function Point() {
6365 );
6466 //
6567 case azimuth.PointSize.Star:
66− const goParties = () => history.push(ROUTE_NAMES.INVITES_MANAGE);
6768 return (
6869 <FooterButton disabled={!isOwner} onClick={goParties}>
6970 Manage parties
@@ -73,7 +74,7 @@ export default function Point() {
7374 default:
7475 return null;
7576 }
76− }, [point, history, isOwner, availableInvites]);
77+ })();
7778
7879 // sync the current cursor
7980 useSyncOwnedPoints([point]);