-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleanup frontend console errors (#2665)
* fix markup errors * componentize modal * try to fix modal issue * upgrade truss * add keys * lint * install peer dependency? * downgrade uswds * jk * make patient results row clickable (#2664) make entire row clickable * fix export issues with package bumps * removed extra prop
- Loading branch information
Showing
19 changed files
with
271 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
containers/tefca-viewer/src/app/query/components/header/header.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.dataUsagePolicyButton { | ||
cursor: pointer; | ||
background: none !important; | ||
border: none !important; | ||
color: white !important; | ||
padding: 0px !important; | ||
font: inherit !important; | ||
} |
71 changes: 71 additions & 0 deletions
71
containers/tefca-viewer/src/app/query/components/header/header.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
"use client"; | ||
|
||
import { useEffect, useRef, useState } from "react"; | ||
import { Modal, ModalButton } from "../../designSystem/Modal"; | ||
import { ModalRef } from "@trussworks/react-uswds"; | ||
import styles from "./header.module.css"; | ||
/** | ||
* Produces the header. | ||
* @returns The HeaderComponent component. | ||
*/ | ||
export default function HeaderComponent() { | ||
const modalRef = useRef<ModalRef>(null); | ||
const [isClient, setIsClient] = useState(false); | ||
|
||
useEffect(() => { | ||
setIsClient(true); | ||
}, []); | ||
|
||
return ( | ||
<> | ||
<header className="usa-header usa-header--basic bg-primary-darker"> | ||
<div | ||
className="header-footer-content usa-nav-container" | ||
style={{ | ||
display: "flex", | ||
alignItems: "center", | ||
justifyContent: "space-between", | ||
}} | ||
> | ||
<div style={{ display: "flex", alignItems: "center" }}> | ||
<div className="usa-logo" style={{ marginLeft: "16px" }}> | ||
<em className="usa-logo__text text-base-lightest"> | ||
<a | ||
className="text-base-lightest font-sans-xl text-bold" | ||
href="/tefca-viewer" | ||
title="TEFCA Viewer" | ||
> | ||
TEFCA Viewer | ||
</a> | ||
</em> | ||
</div> | ||
</div> | ||
<div | ||
style={{ | ||
whiteSpace: "nowrap", | ||
textAlign: "right", | ||
marginLeft: "auto", | ||
}} | ||
> | ||
{isClient && ( | ||
<ModalButton | ||
modalRef={modalRef} | ||
title={"Data Usage Policy"} | ||
className={styles.dataUsagePolicyButton} | ||
/> | ||
)} | ||
</div> | ||
</div> | ||
</header> | ||
|
||
{isClient && ( | ||
<Modal | ||
modalRef={modalRef} | ||
id="data-usage-policy" | ||
heading="How is my data stored?" | ||
description="It's not! Data inputted into the TEFCA Query Connector is not persisted or stored anywhere." | ||
></Modal> | ||
)} | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.