Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Nekitech committed Mar 3, 2024
1 parent e4fc9f8 commit db2b4b8
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
16 changes: 8 additions & 8 deletions src/entities/area/area.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export interface Area {
id: number
institute_id: number
name: string
appointment: string
description: string
institute: string
square: number
}
id: number;
institutes_id: number;
name: string;
appointment: string;
description: string;
institute: string;
square: number;
}
1 change: 1 addition & 0 deletions src/entities/area/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
// @ts-ignore
export type { Area } from "./area.ts";
4 changes: 2 additions & 2 deletions src/features/create-area/CreateArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import { Button, InputLabel, MenuItem, Select, TextField } from "@mui/material";
import { useMemo } from "react";
import { InstitutesModel } from "@src/entities/department/department.ts";
import { useInstitutes } from "@src/shared/hooks/useInstitutes.ts";
import { Area } from "@src/entities/area/area.ts";
import { Area } from "@src/entities/area";

const CreateArea = () => {
const queryClient = useQueryClient();
const { data, isLoading } = useInstitutes();

const { register, handleSubmit, reset } = useForm();
const { register, handleSubmit, reset } = useForm<Area>();

const mutation = useMutation(
(area: Area) => {
Expand Down
5 changes: 3 additions & 2 deletions src/features/update-area/UpdateArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import { baseUrl } from "@src/app/config/api.ts";
import { useForm } from "react-hook-form";
import { Dispatch, SetStateAction, useEffect } from "react";
import { Button, TextField } from "@mui/material";
import { Alert, AlertTypes } from "@src/shared/hooks/useAlert.tsx";
import Area from "@src/entities/area";
import { AlertTypes } from "@src/shared/hooks/useAlert.tsx";
import { Area } from "@src/entities/area";
import { Alert } from "@src/entities/alert";

type UpdateAreaProps = {
id: number | null;
Expand Down
4 changes: 2 additions & 2 deletions src/shared/hooks/useCreateEquipment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import {
} from "react-query";
import { baseUrl } from "../../app/config/api.ts";
import $api from "@src/shared/api/axios.ts";
import Equipment from "@src/entities/equipment";
import { AxiosError } from "axios";
import { Equipment } from "@src/entities/equipment";

type UseCreateEquipmentMutationResult = UseMutationResult<
Equipment[],
AxiosError,
_,
Equipment,
MutationKey
>;

Expand Down

0 comments on commit db2b4b8

Please sign in to comment.