hanging changes

This commit is contained in:
Michael Peters 2021-12-25 21:06:56 -06:00
parent 916c3b2f24
commit 2f526c8ecc
2 changed files with 0 additions and 3 deletions

View File

@ -51,7 +51,6 @@ interface PreviewImageElementProps {
const PreviewImageElement: FC<PreviewImageElementProps> = (props: PreviewImageElementProps) => {
const { guild, previewWidth, previewHeight, resourcePreviewId, resourceId, resourceName } = props;
// TODO: Handle resourceError
const [ previewImgSrc, previewResource, previewResourceError ] = GuildSubscriptions.useSoftImageSrcResourceSubscription(guild, resourcePreviewId);

View File

@ -21,13 +21,11 @@ export interface ImageOverlayProps {
const ImageOverlay: FC<ImageOverlayProps> = (props: ImageOverlayProps) => {
const { guild, resourceId, resourceName } = props;
// TODO: Handle errors
const rootRef = useRef<HTMLDivElement>(null);
const [ imgSrc, resource, resourceError ] = GuildSubscriptions.useSoftImageSrcResourceSubscription(guild, resourceId);
const [ relativeToPos, setRelativeToPos ] = useState<{ x: number, y: number }>({ x: 0, y: 0 });
const [ contextMenu, toggleContextMenu ] = ReactHelper.useContextMenu((close: () => void) => {
if (!resource) return null;
return (