File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed
packages/next/src/next-devtools/dev-overlay
components/devtools-panel Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -28,5 +28,6 @@ export const Default: Story = {
28
28
args : {
29
29
state,
30
30
dispatch : ( ) => { } ,
31
+ issueCount : 1 ,
31
32
} ,
32
33
}
Original file line number Diff line number Diff line change @@ -13,9 +13,11 @@ import { Cross } from '../../icons/cross'
13
13
export function DevToolsPanel ( {
14
14
state,
15
15
dispatch,
16
+ issueCount,
16
17
} : {
17
18
state : OverlayState
18
19
dispatch : OverlayDispatch
20
+ issueCount : number
19
21
} ) {
20
22
const [ activeTab , setActiveTab ] = useState < 'issues' | 'route' | 'settings' > (
21
23
'settings'
@@ -56,7 +58,9 @@ export function DevToolsPanel({
56
58
onClick = { ( ) => setActiveTab ( 'issues' ) }
57
59
>
58
60
Issues
59
- < span data-nextjs-devtools-panel-tab-issues-badge > 1</ span >
61
+ < span data-nextjs-devtools-panel-tab-issues-badge >
62
+ { issueCount }
63
+ </ span >
60
64
</ button >
61
65
< button
62
66
data-nextjs-devtools-panel-tab = { activeTab === 'route' }
@@ -133,6 +137,8 @@ export const DEVTOOLS_PANEL_STYLES = css`
133
137
}
134
138
135
139
[data-nextjs-devtools-panel-tab ] {
140
+ display : flex;
141
+ align-items : center;
136
142
color : var (--color-gray-900 );
137
143
border-radius : var (--rounded-md-2 );
138
144
padding : 4px 12px ;
Original file line number Diff line number Diff line change @@ -49,7 +49,11 @@ export function DevOverlay({
49
49
/>
50
50
51
51
{ state . isDevToolsPanelOpen && (
52
- < DevToolsPanel state = { state } dispatch = { dispatch } />
52
+ < DevToolsPanel
53
+ state = { state }
54
+ dispatch = { dispatch }
55
+ issueCount = { totalErrorCount }
56
+ />
53
57
) }
54
58
</ >
55
59
) : (
You can’t perform that action at this time.
0 commit comments