refactor: return types for hooks

This commit is contained in:
2025-08-14 16:15:10 +04:00
parent c3b0da1e0d
commit 28004dc2a0
7 changed files with 57 additions and 11 deletions

View File

@ -24,12 +24,18 @@ type Props = {
boardId?: number;
};
type StatusesOperations = {
onCreateStatus: (name: string) => void;
onUpdateStatus: (statusId: number, status: UpdateStatusSchema) => void;
onDeleteStatus: (status: StatusSchema) => void;
};
export const useStatusesOperations = ({
statuses,
setStatuses,
refetchStatuses,
boardId,
}: Props) => {
}: Props): StatusesOperations => {
const onError = (error: AxiosError<HttpValidationError>) => {
console.error(error);
notifications.error({