Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 7bd8a97

Browse files
committed
Added authentication to Create new team and Input skills routes.
1 parent 8c50d73 commit 7bd8a97

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/root.component.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default function Root() {
2424
<Router>
2525
<Redirect from="/taas" to="/taas/myteams" exact />
2626
<MyTeamsList path="/taas/myteams" />
27+
<CreateNewTeam path="/taas/myteams/createnewteam" />
2728
<MyTeamsDetails path="/taas/myteams/:teamId" />
2829
<JobDetails path="/taas/myteams/:teamId/positions/:jobId" />
2930
<JobForm path="/taas/myteams/:teamId/positions/:jobId/edit" />
@@ -32,7 +33,6 @@ export default function Root() {
3233
<ResourceBookingForm path="/taas/myteams/:teamId/rb/:resourceBookingId/edit" />
3334
<PositionDetails path="/taas/myteams/:teamId/positions/:positionId/candidates" />
3435
<TeamAccess path="/taas/myteams/:teamId/access" />
35-
<CreateNewTeam path="/taas/myteams/createnewteam" />
3636
<InputSkills path="/taas/myteams/createnewteam/:projectId/skills" />
3737
<SelectRole path="/taas/myteams/createnewteam/:projectId/role" />
3838
</Router>

src/routes/CreateNewTeam/index.jsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import IconMultipleActionsCheck from "../../assets/images/icon-multiple-actions-
1515
import IconListQuill from "../../assets/images/icon-list-quill.svg";
1616
import IconOfficeFileText from "../../assets/images/icon-office-file-text.svg";
1717
import { postProject } from "services/teams";
18+
import withAuthentication from "../../hoc/withAuthentication";
1819

1920
function CreateNewTeam() {
2021
const createProject = async () => {
@@ -60,4 +61,4 @@ function CreateNewTeam() {
6061
);
6162
}
6263

63-
export default CreateNewTeam;
64+
export default withAuthentication(CreateNewTeam);

src/routes/InputSkills/index.jsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import SearchCard from "./components/SearchCard";
2121
import ResultCard from "./components/ResultCard";
2222
import { createJob } from "services/jobs";
2323
import AddAnotherModal from "./components/AddAnotherModal";
24+
import withAuthentication from "../../hoc/withAuthentication";
2425

2526
function InputSkills({ projectId }) {
2627
const [selectedSkills, setSelectedSkills] = useState([]);
@@ -123,4 +124,4 @@ InputSkills.propTypes = {
123124
projectId: PT.string,
124125
};
125126

126-
export default InputSkills;
127+
export default withAuthentication(InputSkills);

0 commit comments

Comments
 (0)