Skip to content

Commit cdf99ac

Browse files
committed
empty states
1 parent 5afe697 commit cdf99ac

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

packages/insomnia/src/ui/routes/mock-route.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const MockRouteRoute = () => {
6060
aria-label='Change Body Type'
6161
triggerButton={
6262
<DropdownButton>
63-
{mockRoute.mimeType ? contentTypesMap[mockRoute.mimeType]?.[0] : 'Mock Body'}
63+
{mockRoute.mimeType ? 'Response ' + contentTypesMap[mockRoute.mimeType]?.[0] : 'Response Body'}
6464
<i className="fa fa-caret-down space-left" />
6565
</DropdownButton>
6666
}
@@ -94,7 +94,7 @@ export const MockRouteRoute = () => {
9494
title="Choose a mock body to return as a response"
9595
/>)}
9696
</TabItem>
97-
<TabItem key="headers" title="Mock Headers">
97+
<TabItem key="headers" title="Response Headers">
9898
<MockResponseHeadersEditor
9999
bulk={false}
100100
/>

packages/insomnia/src/ui/routes/mock-server.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ import { EditableInput } from '../components/editable-input';
1111
import { Icon } from '../components/icon';
1212
import { showModal, showPrompt } from '../components/modals';
1313
import { AskModal } from '../components/modals/ask-modal';
14+
import { EmptyStatePane } from '../components/panes/empty-state-pane';
1415
import { SidebarLayout } from '../components/sidebar-layout';
16+
import { SvgIcon } from '../components/svg-icon';
1517
import { formatMethodName } from '../components/tags/method-tag';
1618
import { MockRouteResponse, MockRouteRoute } from './mock-route';
1719
interface LoaderData {
@@ -261,7 +263,11 @@ const MockServerRoute = () => {
261263
<Route
262264
path="*"
263265
element={
264-
<div className="p-[--padding-md]">No mock route selected</div>
266+
<EmptyStatePane
267+
icon={<SvgIcon icon="bug" />}
268+
documentationLinks={[]}
269+
title="Select or create a route to configured response here"
270+
/>
265271
}
266272
/>
267273
</Routes>}
@@ -277,7 +283,11 @@ const MockServerRoute = () => {
277283
<Route
278284
path="*"
279285
element={
280-
<div className="p-[--padding-md]">No mock route selected</div>
286+
<EmptyStatePane
287+
icon={<SvgIcon icon="bug" />}
288+
documentationLinks={[]}
289+
title="Select or create a route to see activity here"
290+
/>
281291
}
282292
/>
283293
</Routes>}

0 commit comments

Comments
 (0)