-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add loading page for inserting eRSD data into the DB (#123)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
c10bcfe
commit 1f41b8b
Showing
3 changed files
with
75 additions
and
4 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
50 changes: 50 additions & 0 deletions
50
query-connector/src/app/queryBuilding/loadingState/WorkspaceSetUp.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,50 @@ | ||
"use client"; | ||
|
||
import { Icon } from "@trussworks/react-uswds"; | ||
import classNames from "classnames"; | ||
import React from "react"; | ||
import styles from "../queryBuilding.module.scss"; | ||
|
||
interface LoadingViewProps { | ||
loading: boolean; | ||
} | ||
|
||
/** | ||
* | ||
* @param root0 - Component for loading screen. | ||
* @param root0.loading - Boolean to track loading state. | ||
* @returns The LoadingView component. | ||
*/ | ||
const WorkSpaceSetUpView: React.FC<LoadingViewProps> = ({ loading }) => { | ||
if (loading) { | ||
return ( | ||
<> | ||
<div | ||
className={classNames( | ||
"bg-gray-5", | ||
"display-flex", | ||
"flex-align-center", | ||
"flex-justify-center", | ||
styles.emptyStateQueryContainer, | ||
)} | ||
> | ||
<div className="display-flex flex-column flex-align-center"> | ||
<Icon.HourglassEmpty | ||
aria-label="Icon of empty hourglass to indicate loading state" | ||
className={styles.emptyQueryIcon} | ||
></Icon.HourglassEmpty> | ||
<h2 className={styles.emptyQueryTitle}> | ||
Setting up your workspace... | ||
</h2> | ||
<p>This is a one-time setup that may take several minutes.</p> | ||
<p> Please do not navigate away from page during setup.</p> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
} else { | ||
return null; | ||
} | ||
}; | ||
|
||
export default WorkSpaceSetUpView; |
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