Merge branch 'next/groups'

This commit is contained in:
Hunter Miller 2022-02-28 10:55:24 -06:00
commit b955554fa8
3 changed files with 14 additions and 9 deletions

View File

@ -4,7 +4,7 @@ import { compose } from 'lodash/fp';
import _ from 'lodash';
import create, { GetState, SetState, UseStore } from 'zustand';
import { persist } from 'zustand/middleware';
import Urbit, { SubscriptionRequestInterface } from '@urbit/http-api';
import Urbit, { FatalError, SubscriptionRequestInterface } from '@urbit/http-api';
import { Poke } from '@urbit/api';
import api from './api';
import { clearStorageMigration, createStorageKey, storageVersion, useMockData } from './util';
@ -107,7 +107,9 @@ export function createSubscription(
path,
event: e,
err: () => {},
quit: () => {}
quit: () => {
throw new FatalError("subscription clogged");
}
};
// TODO: err, quit handling (resubscribe?)
return request;

View File

@ -8,7 +8,7 @@ import {
} from '@urbit/api';
import { BigInteger } from 'big-integer';
import React, { useCallback } from 'react';
import { useHovering } from '~/logic/lib/util';
import { deSig, useHovering } from '~/logic/lib/util';
import useLocalState from '~/logic/state/local';
import { StatelessAsyncAction } from '~/views/components/StatelessAsyncAction';
import { SwipeMenu } from '~/views/components/SwipeMenu';
@ -38,7 +38,7 @@ const NotificationText = ({ contents, ...rest }: NotificationTextProps) => {
return (
<Mention
key={idx}
ship={content.ship}
ship={deSig(content.ship)}
first={idx === 0}
{...rest}
/>

View File

@ -34,11 +34,14 @@ const FixedOverlay = styled(Col)`
transition: all 0.1s ease-out;
`;
type ProfileOverlayProps = BoxProps & {
ship: string;
children?: ReactNode;
color?: string;
};
interface ProfileOverlayProps extends BoxProps {
/**
* A valid patp (without sig)
*/
ship: string,
children?: ReactNode,
color?: string,
}
const selSettings = (s: SettingsState) => [s.calm.hideAvatars, s.calm.hideNicknames];