Skip to content

Commit

Permalink
Hook up button to creation script (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
bamader authored Nov 13, 2024
1 parent fa60764 commit 161104f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import styles from "../queryBuilding.module.scss";
import { useRouter } from "next/navigation";
import classNames from "classnames";
import WorkSpaceSetUpView from "../loadingState/WorkspaceSetUp";
import { createDibbsDB } from "@/db-creation";
/**
* Empty-state component for query building
* @returns the EmptyQueriesDisplay to render the empty state status
Expand All @@ -18,14 +19,13 @@ export const EmptyQueriesDisplay: React.FC = () => {
// DB Creation Function
console.log("Creating DB...");

await new Promise((r) => setTimeout(r, 5000)); //remove once DB creation is implemented
// await createDibbsDB();
await createDibbsDB();

// Stop loading and redirect once function is complete
setLoading(false);

// Redirect to query building page
// router.push("/queryBuilding/buildFromTemplates");
router.push("/queryBuilding/buildFromTemplates");
};

if (loading) {
Expand Down
2 changes: 2 additions & 0 deletions query-connector/src/db-creation.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"use server";

import { ersdToDibbsConceptMap, ErsdConceptType } from "@/app/constants";
import { Bundle, BundleEntry, ValueSet } from "fhir/r4";
import {
Expand Down

0 comments on commit 161104f

Please sign in to comment.