File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed
packages/next/src/next-devtools/dev-overlay/components/devtools-panel Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change
1
+ import type { DevToolsPanelTabType } from '../devtools-panel'
2
+
3
+ export function DevToolsPanelTab ( {
4
+ activeTab,
5
+ } : {
6
+ activeTab : DevToolsPanelTabType
7
+ } ) {
8
+ if ( activeTab === 'settings' ) {
9
+ return < div > Settings</ div >
10
+ }
11
+
12
+ if ( activeTab === 'route' ) {
13
+ return < div > Route</ div >
14
+ }
15
+
16
+ if ( activeTab === 'issues' ) {
17
+ return < div > Issues</ div >
18
+ }
19
+
20
+ console . log (
21
+ `[Next.js DevTools] Received unknown Panel Tab: "${ activeTab } ". This is a bug in Next.js DevTools.`
22
+ )
23
+ return null
24
+ }
Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ function getInitialPosition(): Corners {
26
26
import { FullScreenIcon } from '../../icons/fullscreen'
27
27
import { Cross } from '../../icons/cross'
28
28
import { DevToolsPanelFooter } from './devtools-panel-footer'
29
+ import { DevToolsPanelTab } from './devtools-panel-tab/devtools-panel-tab'
30
+
31
+ export type DevToolsPanelTabType = 'issues' | 'route' | 'settings'
29
32
30
33
export function DevToolsPanel ( {
31
34
state,
@@ -134,7 +137,9 @@ export function DevToolsPanel({
134
137
</ div >
135
138
</ div >
136
139
</ DialogHeader >
137
- < DialogBody > </ DialogBody >
140
+ < DialogBody >
141
+ < DevToolsPanelTab activeTab = { activeTab } />
142
+ </ DialogBody >
138
143
</ DialogContent >
139
144
</ Dialog >
140
145
< DevToolsPanelFooter versionInfo = { state . versionInfo } />
You can’t perform that action at this time.
0 commit comments