Skip to content

Commit

Permalink
fix: replaced type any.
Browse files Browse the repository at this point in the history
  • Loading branch information
mheggelund committed Jan 31, 2024
1 parent 0fc7a67 commit 05cc382
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/AreaCoordinates/AreaCoordinates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,12 @@ export const AreaCoordinates = ({ modelId }: { modelId: string }) => {
return 'success';
};

const setCoordinates = (target: any, index: number, axis: string) => {
const setCoordinates = (valute: string, index: number, axis: string) => {
if (!areaCoordinate) return;

const uppdatedArea = {
...areaCoordinate?.coordinates[index],
[axis]: target.value,
[axis]: valute,
};
const newCoordinates = { ...areaCoordinate };
newCoordinates.coordinates[index] = uppdatedArea;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const CoordinateInput = ({
label: string;
error: boolean;
areaCoordinate: AreaCoordinateType | undefined;
setCoordinates: (target: any, index: number, axis: string) => void;
setCoordinates: (value: string, index: number, axis: string) => void;
position: number;
axis: string;
activeArea: ModelAreaTypeDto;
Expand All @@ -29,8 +29,8 @@ export const CoordinateInput = ({
? areaCoordinate?.coordinates[position].x
: areaCoordinate?.coordinates[position].y
}
onChange={(input: { target: any }) =>
setCoordinates(input.target, position, axis)
onChange={(e: React.FormEvent<HTMLInputElement>) =>
setCoordinates(e.currentTarget.value, position, axis)
}
rightAdornments={
error ? (
Expand Down

0 comments on commit 05cc382

Please sign in to comment.