Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
51d0df49
Commit
51d0df49
authored
7 years ago
by
Tharaka Wijebandara
Committed by
Dan Abramov
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Rename Overlay to ErrorOvelay (#3051)
parent
270b1dc5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
packages/react-error-overlay/src/components/ErrorOverlay.js
+2
-2
packages/react-error-overlay/src/components/ErrorOverlay.js
packages/react-error-overlay/src/containers/CompileErrorContainer.js
+3
-3
...act-error-overlay/src/containers/CompileErrorContainer.js
packages/react-error-overlay/src/containers/RuntimeErrorContainer.js
+3
-3
...act-error-overlay/src/containers/RuntimeErrorContainer.js
with
8 additions
and
8 deletions
+8
-8
packages/react-error-overlay/src/components/Overlay.js
→
packages/react-error-overlay/src/components/
Error
Overlay.js
+
2
-
2
View file @
51d0df49
...
...
@@ -31,7 +31,7 @@ const overlayStyle = {
color
:
black
,
};
class
Overlay
extends
Component
{
class
Error
Overlay
extends
Component
{
iframeWindow
:
window
=
null
;
getIframeWindow
=
(
element
:
HTMLDivElement
)
=>
{
...
...
@@ -71,4 +71,4 @@ class Overlay extends Component {
}
}
export
default
Overlay
;
export
default
Error
Overlay
;
This diff is collapsed.
Click to expand it.
packages/react-error-overlay/src/containers/CompileErrorContainer.js
+
3
-
3
View file @
51d0df49
...
...
@@ -9,7 +9,7 @@
/* @flow */
import
React
,
{
PureComponent
}
from
'
react
'
;
import
Overlay
from
'
../components/Overlay
'
;
import
Error
Overlay
from
'
../components/
Error
Overlay
'
;
import
Footer
from
'
../components/Footer
'
;
import
Header
from
'
../components/Header
'
;
import
CodeBlock
from
'
../components/CodeBlock
'
;
...
...
@@ -19,11 +19,11 @@ class CompileErrorContainer extends PureComponent {
render
()
{
const
{
error
}
=
this
.
props
;
return
(
<
Overlay
>
<
Error
Overlay
>
<
Header
headerText
=
"
Failed to compile
"
/>
<
CodeBlock
main
=
{
true
}
codeHTML
=
{
generateAnsiHTML
(
error
)}
/
>
<
Footer
line1
=
"
This error occurred during the build time and cannot be dismissed.
"
/>
<
/Overlay
>
<
/
Error
Overlay
>
);
}
}
...
...
This diff is collapsed.
Click to expand it.
packages/react-error-overlay/src/containers/RuntimeErrorContainer.js
+
3
-
3
View file @
51d0df49
...
...
@@ -9,7 +9,7 @@
/* @flow */
import
React
,
{
PureComponent
}
from
'
react
'
;
import
Overlay
from
'
../components/Overlay
'
;
import
Error
Overlay
from
'
../components/
Error
Overlay
'
;
import
CloseButton
from
'
../components/CloseButton
'
;
import
NavigationBar
from
'
../components/NavigationBar
'
;
import
RuntimeError
from
'
./RuntimeError
'
;
...
...
@@ -52,7 +52,7 @@ class RuntimeErrorContainer extends PureComponent {
const
{
errorRecords
,
close
}
=
this
.
props
;
const
totalErrors
=
errorRecords
.
length
;
return
(
<
Overlay
shortcutHandler
=
{
this
.
shortcutHandler
}
>
<
Error
Overlay
shortcutHandler
=
{
this
.
shortcutHandler
}
>
<
CloseButton
close
=
{
close
}
/
>
{
totalErrors
>
1
&&
<
NavigationBar
...
...
@@ -69,7 +69,7 @@ class RuntimeErrorContainer extends PureComponent {
line1
=
"
This screen is visible only in development. It will not appear if the app crashes in production.
"
line2
=
"
Open your browser’s developer console to further inspect this error.
"
/>
<
/Overlay
>
<
/
Error
Overlay
>
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets