Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
3caa9960
Unverified
Commit
3caa9960
authored
Jul 30, 2020
by
Arsalan Khattak
Committed by
GitHub
Jul 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Error overlay should not be dismissable for a server error (#14011)
parent
ce56b601
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
35 deletions
+37
-35
Dialog.tsx
...act-dev-overlay/src/internal/components/Dialog/Dialog.tsx
+1
-1
LeftRightDialogHeader.tsx
...omponents/LeftRightDialogHeader/LeftRightDialogHeader.tsx
+34
-32
Errors.tsx
packages/react-dev-overlay/src/internal/container/Errors.tsx
+2
-2
No files found.
packages/react-dev-overlay/src/internal/components/Dialog/Dialog.tsx
View file @
3caa9960
...
...
@@ -5,7 +5,7 @@ export type DialogProps = {
type
:
'error'
|
'warning'
'aria-labelledby'
:
string
'aria-describedby'
:
string
onClose
:
(
e
:
MouseEvent
|
TouchEvent
)
=>
void
onClose
?
:
(
e
:
MouseEvent
|
TouchEvent
)
=>
void
}
const
Dialog
:
React
.
FC
<
DialogProps
>
=
function
Dialog
({
...
...
packages/react-dev-overlay/src/internal/components/LeftRightDialogHeader/LeftRightDialogHeader.tsx
View file @
3caa9960
...
...
@@ -4,7 +4,7 @@ export type LeftRightDialogHeaderProps = {
className
?:
string
previous
:
(()
=>
void
)
|
null
next
:
(()
=>
void
)
|
null
close
:
()
=>
void
close
?
:
()
=>
void
}
const
LeftRightDialogHeader
:
React
.
FC
<
LeftRightDialogHeaderProps
>
=
function
LeftRightDialogHeader
({
...
...
@@ -142,37 +142,39 @@ const LeftRightDialogHeader: React.FC<LeftRightDialogHeaderProps> = function Lef
{
children
}
</
nav
>
<
button
ref=
{
buttonClose
}
type=
"button"
onClick=
{
close
}
aria
-
label=
"Close"
>
<
span
aria
-
hidden=
"true"
>
<
svg
width=
"24"
height=
"24"
viewBox=
"0 0 24 24"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<
path
d=
"M18 6L6 18"
stroke=
"currentColor"
strokeWidth=
"2"
strokeLinecap=
"round"
strokeLinejoin=
"round"
/>
<
path
d=
"M6 6L18 18"
stroke=
"currentColor"
strokeWidth=
"2"
strokeLinecap=
"round"
strokeLinejoin=
"round"
/>
</
svg
>
</
span
>
</
button
>
{
close
&&
(
<
button
ref=
{
buttonClose
}
type=
"button"
onClick=
{
close
}
aria
-
label=
"Close"
>
<
span
aria
-
hidden=
"true"
>
<
svg
width=
"24"
height=
"24"
viewBox=
"0 0 24 24"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<
path
d=
"M18 6L6 18"
stroke=
"currentColor"
strokeWidth=
"2"
strokeLinecap=
"round"
strokeLinejoin=
"round"
/>
<
path
d=
"M6 6L18 18"
stroke=
"currentColor"
strokeWidth=
"2"
strokeLinecap=
"round"
strokeLinejoin=
"round"
/>
</
svg
>
</
span
>
</
button
>
)
}
</
div
>
)
}
...
...
packages/react-dev-overlay/src/internal/container/Errors.tsx
View file @
3caa9960
...
...
@@ -252,14 +252,14 @@ export const Errors: React.FC<ErrorsProps> = function Errors({ errors }) {
type=
"error"
aria
-
labelledby=
"nextjs__container_errors_label"
aria
-
describedby=
"nextjs__container_errors_desc"
onClose=
{
minimize
}
onClose=
{
!
isServerError
&&
minimize
}
>
<
DialogContent
>
<
DialogHeader
className=
"nextjs-container-errors-header"
>
<
LeftRightDialogHeader
previous=
{
activeIdx
>
0
?
previous
:
null
}
next=
{
activeIdx
<
readyErrors
.
length
-
1
?
next
:
null
}
close=
{
minimize
}
close=
{
!
isServerError
&&
minimize
}
>
<
small
>
<
span
>
{
activeIdx
+
1
}
</
span
>
of
{
' '
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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