From 7c48533571e9f9d3731a59433a56cc8d6e008123 Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Sat, 12 Feb 2022 10:59:19 +0100 Subject: Added search and filter options --- src/components/App/App.tsx | 54 ++++++---------------------------------------- 1 file changed, 6 insertions(+), 48 deletions(-) (limited to 'src/components/App/App.tsx') diff --git a/src/components/App/App.tsx b/src/components/App/App.tsx index 55ab5b4..e08c84f 100644 --- a/src/components/App/App.tsx +++ b/src/components/App/App.tsx @@ -6,8 +6,7 @@ import useRequests, { } from "../../hooks/useRequests"; import styles from './App.module.scss'; -import Details from "../Details/Details"; -import RequestSummary from "../RequestSummary/RequestSummary"; +import RequestDetails from "../RequestDetails/RequestDetails"; import {getHost} from "../../utils"; import {Container, ListGroup, Nav, Navbar, NavDropdown} from "react-bootstrap"; import classNames from "classnames"; @@ -16,6 +15,7 @@ import {Sun} from "../Icons/Sun"; import {Moon} from "../Icons/Moon"; import Trash from "../Icons/Trash"; import {DarkModeContext} from "../../contexts/DarkMode"; +import RequestList from "../RequestList/RequestList"; interface Config { url: string @@ -143,53 +143,11 @@ export default function App() {
- - { - calls.length > 0 - ? ( - calls.slice(0).reverse().map((requestResponse, index) => { - const selected = selectedRequestIndex === calls.length - index - 1; - return ( - setSelectedRequestIndex(calls.length - index - 1)} - key={`request-${index}`} - className={classNames({ - 'bg-primary': selected, - 'text-light': selected, - 'border-bottom': true - })} - > - - - ) - }) - ) - : ( -
-

No requests

-
- ) - } -
+
+ +
- { - selectedRequest !== null - ? ( -
- ) : ( -
-

Select a request to inspect it

-
- ) - } +
-- cgit v1.2.3