Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-bes committed Nov 21, 2023
1 parent 983d398 commit 3c61e91
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
import React from "react";
// import { BrowserRouter as Router, Route, Routes } from "react-router-dom";
import { BrowserRouter as Router, Route, Routes } from "react-router-dom";

import { IPSForm } from "./components/IPSForm";
// import { IPSResult } from "./components/IPSResult";
import { IPSResult } from "./components/IPSResult";
import { NavBar } from "./components/NavBar";

export const App = () => {
return (
<>
<NavBar />
{/* <Router>
<Router>
<Routes>
<Route path="/" element={<IPSForm />} />
<Route path="jsonViewer/" element={<IPSResult />} />
</Routes>
</Router> */}
<IPSForm />
</Router>
</>
);
};
6 changes: 3 additions & 3 deletions src/components/IPSForm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useEffect } from "react";
import { useParams } from "react-router-dom";
import { useNavigate, useParams } from "react-router-dom";
import styled from "styled-components";
import PropTypes from "prop-types";
import MuiButton from "@material-ui/core/Button";
Expand Down Expand Up @@ -83,7 +83,7 @@ export const IPSForm = () => {
const {
payload: payloadBase64 = "ewogICAgImRhdGVPZkJpcnRoIjogIjIwMjItMTItMTIiCn0=",
} = useParams();
// const navigate = useNavigate();
const navigate = useNavigate();

const { data: ipsPayload, isLoading } = useIPS({ url: payload?.url });

Expand All @@ -98,7 +98,7 @@ export const IPSForm = () => {
const patient = ipsPayload.entry.find(entry => entry.resource.resourceType === 'Patient');
if (patient.birthDate === enteredDateOfBirth) {
setErrorMessage(null);
// navigate(`/jsonViewer?url=${btoa(payload.url)}`);
navigate(`/jsonViewer?url=${btoa(payload.url)}`);
return;
}

Expand Down

0 comments on commit 3c61e91

Please sign in to comment.