Commit 67e2a70c authored by nhukretep's avatar nhukretep
Browse files

set default destinationId

parent 031c1ab6
......@@ -20,6 +20,7 @@ import { getAccessToken, sendApplication, getStatus } from "./requests";
import { useStyles } from "./styles";
const defaultValues = {
destinationId: "f08a200d-b950-4aa1-b4bf-2402ab66a923",
applicant: { givenName: "Werner", familyName: "Mustermann" },
serviceType: { leikaId: "99050012104000", name: "Gewerbeanmeldung" },
applicationData: JSON.stringify(
......@@ -39,7 +40,7 @@ function App() {
// state variables and hook functions
const [status, setStatus] = useState("init");
const [accessToken, setAccessToken] = useState("");
const [destinationId, setDestinationId] = useState("");
const [destinationId, setDestinationId] = useState(defaultValues.destinationId);
const [applicationApplicant, setApplicationApplicant] = useState(defaultValues.applicant);
const [applicationServiceType, setApplicationServiceType] = useState(defaultValues.serviceType);
const [applicationData, setApplicationData] = useState(defaultValues.applicationData);
......@@ -94,6 +95,7 @@ function App() {
// handle function to reset the form
const handleNewApplication = () => {
setDestinationId(defaultValues.destinationId);
setApplicationApplicant(defaultValues.applicant);
setApplicationServiceType(defaultValues.serviceType);
setApplicationData(defaultValues.applicationData);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment