|
1 |
| -import { useState } from 'react' |
2 |
| -import reactLogo from './assets/react.svg' |
3 |
| -import viteLogo from '/vite.svg' |
| 1 | +import {useState} from 'react' |
4 | 2 | import './App.scss'
|
5 |
| -import { Button } from '@trussworks/react-uswds' |
| 3 | +import {Button, Link, SideNav} from "@trussworks/react-uswds"; |
| 4 | +import {useLocation, useNavigate, useNavigation} from "react-router-dom"; |
6 | 5 |
|
| 6 | +import {AppHeader} from "./components/AppHeader/AppHeader.tsx"; |
| 7 | +import dataLinkLogo from "./assets/datalink_placeholder_logo.svg"; |
| 8 | +import extractImage from "./assets/extract_image.svg" |
7 | 9 | function App() {
|
8 |
| - const [count, setCount] = useState(0) |
| 10 | + const {pathname} = useLocation() |
| 11 | + const navigate = useNavigate() |
| 12 | + const navLinks = [ |
| 13 | + {text: "Annotate and Extract", url: "/annotate"}, |
| 14 | + {text: "Label Management", url: "/labels"}, |
| 15 | + {text: "Dashboard", url: "/"} |
| 16 | + ] |
9 | 17 |
|
10 |
| - return ( |
11 |
| - <> |
12 |
| - <div> |
13 |
| - <a href="https://vitejs.dev" target="_blank"> |
14 |
| - <img src={viteLogo} className="logo" alt="Vite logo" /> |
15 |
| - </a> |
16 |
| - <a href="https://react.dev" target="_blank"> |
17 |
| - <img src={reactLogo} className="logo react" alt="React logo" /> |
18 |
| - </a> |
19 |
| - </div> |
20 |
| - <h1>Vite + React</h1> |
21 |
| - <div className="card"> |
22 |
| - <button onClick={() => setCount((count) => count + 1)}> |
23 |
| - count is {count} |
24 |
| - </button> |
25 |
| - <p> |
26 |
| - Edit <code>src/App.tsx</code> and save to test HMR |
27 |
| - </p> |
28 |
| - </div> |
29 |
| - <p className="read-the-docs"> |
30 |
| - Click on the Vite and React logos to learn more |
31 |
| - </p> |
32 |
| - <Button type="button">Click Me</Button> |
33 |
| - </> |
34 |
| - ) |
| 18 | + |
| 19 | + return ( |
| 20 | + <> |
| 21 | + <div className='display-flex flex-column width-full height-full'> |
| 22 | + <AppHeader jurisdiction={`Demo STLT`}/> |
| 23 | + <div className="display-flex flex-row height-full"> |
| 24 | + <div |
| 25 | + className="flex-3 padding-top-1 padding-left-1 padding-right-4 minw-15 usa-dark-background bg-primary-dark text-base-lightest display-flex flex-column flex-gap-1 maxw-30" |
| 26 | + > |
| 27 | + <div className='display-flex flex-column flex-align-start padding-top-2'> |
| 28 | + {navLinks.map((i, idx) => { |
| 29 | + return <Link key={idx} href={i.url} |
| 30 | + className={`border-left-2px padding-left-1 padding-top-2 padding-bottom-2 ${i.url === pathname ? 'text-bold' : 'border-primary-dark'}`}>{i.text}</Link> |
| 31 | + })} |
| 32 | + </div> |
| 33 | + </div> |
| 34 | + <div className="flex-10 display-flex flex-column"> |
| 35 | + <h2 className="padding-left-2">Annotate and Extract</h2> |
| 36 | + <div className=" flex-1 padding-left-2 padding-right-2 bg-idwa-light" > |
| 37 | + <p><span className="text-bold">Welcome Blake, </span></p> |
| 38 | + <p>Extract data from any PDFs, or images to send to your surveillance systems using data from your saved templates or create new segmentations.</p> |
| 39 | + <img className="display-block margin-left-auto margin-right-auto padding-top-8" src={extractImage} alt="Extract From Documents"/> |
| 40 | + <p className="text-bold text-center">You have no segmentation templates set up yet. The templates will be used to extract data for your lab forms.</p> |
| 41 | + <Button type="button" className="usa-button display-flex flex-align-center margin-left-auto margin-right-auto" onClick={() => navigate("/new-template/upload")}>+ New Template</Button> |
| 42 | + </div> |
| 43 | + </div> |
| 44 | + </div> |
| 45 | + |
| 46 | + </div> |
| 47 | + |
| 48 | + </> |
| 49 | + ) |
35 | 50 | }
|
36 | 51 |
|
37 | 52 | export default App
|
0 commit comments