Plugin download progress and error handling
Summary: Show progress reporting in sidebar during plugin download. Also handle plugin download errors and show them to user as notifications. Reviewed By: mweststrate Differential Revision: D25530385 fbshipit-source-id: 42bf0e65b4434d00c1465705ce9ec5c723df6841
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c3d61cc32d
commit
efb82e80b5
@@ -30,6 +30,7 @@ export default function Link(props: {
|
||||
href: string;
|
||||
children?: React.ReactNode;
|
||||
style?: React.CSSProperties;
|
||||
onClick?: ((event: React.MouseEvent<any>) => void) | undefined;
|
||||
}) {
|
||||
const isSandy = useIsSandy();
|
||||
const onClick = useCallback(
|
||||
@@ -42,9 +43,9 @@ export default function Link(props: {
|
||||
);
|
||||
|
||||
return isSandy ? (
|
||||
<AntOriginalLink {...props} onClick={onClick} />
|
||||
<AntOriginalLink {...props} onClick={props.onClick ?? onClick} />
|
||||
) : (
|
||||
<StyledLink onClick={onClick} style={props.style}>
|
||||
<StyledLink onClick={props.onClick ?? onClick} style={props.style}>
|
||||
{props.children || props.href}
|
||||
</StyledLink>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user