mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 00:20:04 +01:00
[DevTools] Don't suspend shell while retrieving original source for "open-in-editor" (#34381)
This commit is contained in:
parent
5a31758ed6
commit
e2cc315a1b
|
|
@ -23,7 +23,7 @@ type Props = {
|
|||
symbolicatedSourcePromise: Promise<SourceMappedLocation | null>,
|
||||
};
|
||||
|
||||
function OpenInEditorButton({
|
||||
function OpenSymbolicatedSourceInEditorButton({
|
||||
editorURL,
|
||||
source,
|
||||
symbolicatedSourcePromise,
|
||||
|
|
@ -45,4 +45,17 @@ function OpenInEditorButton({
|
|||
);
|
||||
}
|
||||
|
||||
function OpenInEditorButton(props: Props): React.Node {
|
||||
return (
|
||||
<React.Suspense
|
||||
fallback={
|
||||
<Button disabled={true} title="retrieving original source…">
|
||||
<ButtonIcon type="editor" />
|
||||
</Button>
|
||||
}>
|
||||
<OpenSymbolicatedSourceInEditorButton {...props} />
|
||||
</React.Suspense>
|
||||
);
|
||||
}
|
||||
|
||||
export default OpenInEditorButton;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user