Basic MultiJobs
This commit is contained in:
parent
91027e79af
commit
8ad5b7876c
25 changed files with 539 additions and 142 deletions
|
@ -1,19 +1,21 @@
|
|||
import { useState, useContext, useEffect } from "react";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { useLocation, useNavigate } from "react-router-dom";
|
||||
|
||||
import JobContext from "../../ctx/JobContext.jsx";
|
||||
import JobBox from "./JobBox.jsx";
|
||||
import JobTestSelector from "./JobTestSelector.jsx";
|
||||
import JobView from "./JobView.jsx";
|
||||
import JobBuilder from "./builder/JobBuilder.jsx";
|
||||
|
||||
export default function Jobs() {
|
||||
const {
|
||||
state: jobState,
|
||||
dispatch: jobDispatch,
|
||||
jobBuilder,
|
||||
} = useContext(JobContext);
|
||||
const { state: jobState } = useContext(JobContext);
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
|
||||
useEffect(() => {
|
||||
const jobName = location.hash.slice(1);
|
||||
if (!jobName || jobState.jobs.find((job) => job.name === jobName)) return;
|
||||
navigate("/qualiteer/jobs");
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="jobs">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue