mirror of
https://github.com/facebook/react.git
synced 2026-02-27 03:07:57 +00:00
[DevTools] Don't suspend shell while retrieving original source for "open-in-editor" (#34381)
This commit is contained in:
committed by
GitHub
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;
|
||||
|
||||
Reference in New Issue
Block a user