Skip to content

Commit f5f4e07

Browse files
committed
issue count
1 parent 4134307 commit f5f4e07

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

packages/next/src/next-devtools/dev-overlay/components/devtools-panel/devtools-panel.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ export const Default: Story = {
2828
args: {
2929
state,
3030
dispatch: () => {},
31+
issueCount: 1,
3132
},
3233
}

packages/next/src/next-devtools/dev-overlay/components/devtools-panel/devtools-panel.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ import { Cross } from '../../icons/cross'
1313
export function DevToolsPanel({
1414
state,
1515
dispatch,
16+
issueCount,
1617
}: {
1718
state: OverlayState
1819
dispatch: OverlayDispatch
20+
issueCount: number
1921
}) {
2022
const [activeTab, setActiveTab] = useState<'issues' | 'route' | 'settings'>(
2123
'settings'
@@ -56,7 +58,9 @@ export function DevToolsPanel({
5658
onClick={() => setActiveTab('issues')}
5759
>
5860
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>
6064
</button>
6165
<button
6266
data-nextjs-devtools-panel-tab={activeTab === 'route'}
@@ -133,6 +137,8 @@ export const DEVTOOLS_PANEL_STYLES = css`
133137
}
134138
135139
[data-nextjs-devtools-panel-tab] {
140+
display: flex;
141+
align-items: center;
136142
color: var(--color-gray-900);
137143
border-radius: var(--rounded-md-2);
138144
padding: 4px 12px;

packages/next/src/next-devtools/dev-overlay/dev-overlay.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ export function DevOverlay({
4949
/>
5050

5151
{state.isDevToolsPanelOpen && (
52-
<DevToolsPanel state={state} dispatch={dispatch} />
52+
<DevToolsPanel
53+
state={state}
54+
dispatch={dispatch}
55+
issueCount={totalErrorCount}
56+
/>
5357
)}
5458
</>
5559
) : (

0 commit comments

Comments
 (0)