Major updates on Master Statistical
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { Assignment } from "@/interfaces/results";
|
||||
import { AssignmentWithCorporateId } from "@/interfaces/results";
|
||||
import axios from "axios";
|
||||
import moment from "moment";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
export default function useAssignmentsCorporates({
|
||||
@@ -12,7 +11,7 @@ export default function useAssignmentsCorporates({
|
||||
startDate: Date | null;
|
||||
endDate: Date | null;
|
||||
}) {
|
||||
const [assignments, setAssignments] = useState<Assignment[]>([]);
|
||||
const [assignments, setAssignments] = useState<AssignmentWithCorporateId[]>([]);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [isError, setIsError] = useState(false);
|
||||
|
||||
@@ -30,7 +29,7 @@ export default function useAssignmentsCorporates({
|
||||
});
|
||||
|
||||
axios
|
||||
.get<Assignment[]>(
|
||||
.get<AssignmentWithCorporateId[]>(
|
||||
`/api/assignments/corporate?${urlSearchParams.toString()}`
|
||||
)
|
||||
.then(async (response) => {
|
||||
|
||||
Reference in New Issue
Block a user