From 8b6175eb71b35ca1e516200dcfd960d12e4bc0ca Mon Sep 17 00:00:00 2001 From: romantarkin Date: Sun, 2 Feb 2025 19:47:56 +0500 Subject: [PATCH] fix Unexpected any. --- docker-compose.yaml | 4 +++- src/api/bodyTypes.ts | 8 +++++--- src/api/carBrands.ts | 8 +++++--- src/api/carColors.ts | 8 +++++--- src/api/carModels.ts | 8 +++++--- src/api/cars.ts | 8 +++++--- src/api/context/BodyType.tsx | 6 ++---- src/api/context/Car.tsx | 4 ++-- src/api/context/CarBrand.tsx | 4 ++-- src/api/context/CarColor.tsx | 3 +-- src/api/context/CarModel.tsx | 4 ++-- src/api/context/Customer.tsx | 4 ++-- src/api/context/Engine.tsx | 4 ++-- src/api/context/Sale.tsx | 4 ++-- src/api/context/Transmission.tsx | 4 ++-- src/api/context/Trim.tsx | 4 ++-- src/api/customers.ts | 8 +++++--- src/api/engines.ts | 8 +++++--- src/api/sales.ts | 8 +++++--- src/api/transmissions.ts | 8 +++++--- src/api/trims.ts | 8 +++++--- src/components/Content/Content.tsx | 5 ++++- src/components/Input/Input.tsx | 9 +++++++-- src/components/Input/InputColor.tsx | 8 ++++++-- src/components/Input/InputDate.tsx | 9 +++++++-- src/components/Modal/Modal.tsx | 5 ++++- src/components/NavBar/NavBar.tsx | 5 ++++- src/components/Select/Select.tsx | 20 +++++++++++++++++--- src/components/Table/Row.tsx | 6 ++++-- src/components/Table/Rows.tsx | 6 ++++-- src/components/Table/Table.tsx | 9 ++++++--- src/pages/Sale.tsx | 1 - 32 files changed, 135 insertions(+), 73 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 8823cdd..9221cf9 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -20,7 +20,7 @@ services: image: node:20 restart: always working_dir: /app - command: bash -c "npm install && npm run build && npm run start" + command: bash -c "npm ci --force && npm run build && npm run start" environment: MYSQL_USER: ${MYSQL_USER} MYSQL_PASSWORD: ${MYSQL_PASSWORD} @@ -28,5 +28,7 @@ services: MYSQL_DATABASE_NAME: ${MYSQL_DATABASE_NAME} volumes: - ./:/app + ports: + - '3000:80' networks: reverse_proxy: \ No newline at end of file diff --git a/src/api/bodyTypes.ts b/src/api/bodyTypes.ts index 6267ce0..5d5412a 100644 --- a/src/api/bodyTypes.ts +++ b/src/api/bodyTypes.ts @@ -1,9 +1,11 @@ +import {BodyTypeItem} from "@/api/context/BodyType"; + export async function list () { const response = await fetch('/api/v1/body-types'); return (await response.json()).results.rows; } -export async function add (params: any) { +export async function add (params: BodyTypeItem) { const response = await fetch('/api/v1/body-types', { method: 'POST', headers: { @@ -14,7 +16,7 @@ export async function add (params: any) { return await response.json(); } -export async function update (params: any) { +export async function update (params: BodyTypeItem) { const response = await fetch('/api/v1/body-types', { method: 'PUT', headers: { @@ -30,7 +32,7 @@ export async function update (params: any) { return await response.json(); } -export async function remove (params: any) { +export async function remove (params: BodyTypeItem) { const response = await fetch('/api/v1/body-types', { method: 'DELETE', headers: { diff --git a/src/api/carBrands.ts b/src/api/carBrands.ts index 7f8b0af..1be423f 100644 --- a/src/api/carBrands.ts +++ b/src/api/carBrands.ts @@ -1,9 +1,11 @@ +import {CarBrandItem} from "@/api/context/CarBrand"; + export async function list () { const response = await fetch('/api/v1/car-brands'); return (await response.json()).results.rows; } -export async function add (params: any) { +export async function add (params: CarBrandItem) { const response = await fetch('/api/v1/car-brands', { method: 'POST', headers: { @@ -14,7 +16,7 @@ export async function add (params: any) { return await response.json(); } -export async function update (params: any) { +export async function update (params: CarBrandItem) { const response = await fetch('/api/v1/car-brands', { method: 'PUT', headers: { @@ -30,7 +32,7 @@ export async function update (params: any) { return await response.json(); } -export async function remove (params: any) { +export async function remove (params: CarBrandItem) { const response = await fetch('/api/v1/car-brands', { method: 'DELETE', headers: { diff --git a/src/api/carColors.ts b/src/api/carColors.ts index 56f90ac..e0de27a 100644 --- a/src/api/carColors.ts +++ b/src/api/carColors.ts @@ -1,9 +1,11 @@ +import {CarColorItem} from "@/api/context/CarColor"; + export async function list () { const response = await fetch('/api/v1/car-colors'); return (await response.json()).results.rows; } -export async function add (params: any) { +export async function add (params: CarColorItem) { const response = await fetch('/api/v1/car-colors', { method: 'POST', headers: { @@ -14,7 +16,7 @@ export async function add (params: any) { return await response.json(); } -export async function update (params: any) { +export async function update (params: CarColorItem) { const response = await fetch('/api/v1/car-colors', { method: 'PUT', headers: { @@ -30,7 +32,7 @@ export async function update (params: any) { return await response.json(); } -export async function remove (params: any) { +export async function remove (params: CarColorItem) { const response = await fetch('/api/v1/car-colors', { method: 'DELETE', headers: { diff --git a/src/api/carModels.ts b/src/api/carModels.ts index d10a429..b101753 100644 --- a/src/api/carModels.ts +++ b/src/api/carModels.ts @@ -1,9 +1,11 @@ +import {CarModelItem} from "@/api/context/CarModel"; + export async function list () { const response = await fetch('/api/v1/car-models'); return (await response.json()).results.rows; } -export async function add (params: any) { +export async function add (params: CarModelItem) { const response = await fetch('/api/v1/car-models', { method: 'POST', headers: { @@ -14,7 +16,7 @@ export async function add (params: any) { return await response.json(); } -export async function update (params: any) { +export async function update (params: CarModelItem) { const response = await fetch('/api/v1/car-models', { method: 'PUT', headers: { @@ -30,7 +32,7 @@ export async function update (params: any) { return await response.json(); } -export async function remove (params: any) { +export async function remove (params: CarModelItem) { const response = await fetch('/api/v1/car-models', { method: 'DELETE', headers: { diff --git a/src/api/cars.ts b/src/api/cars.ts index 83ff944..9357631 100644 --- a/src/api/cars.ts +++ b/src/api/cars.ts @@ -1,9 +1,11 @@ +import {CarItem} from "@/api/context/Car"; + export async function list () { const response = await fetch('/api/v1/cars'); return (await response.json()).results.rows; } -export async function add (params: any) { +export async function add (params: CarItem) { const response = await fetch('/api/v1/cars', { method: 'POST', headers: { @@ -14,7 +16,7 @@ export async function add (params: any) { return await response.json(); } -export async function update (params: any) { +export async function update (params: CarItem) { const response = await fetch('/api/v1/cars', { method: 'PUT', headers: { @@ -30,7 +32,7 @@ export async function update (params: any) { return await response.json(); } -export async function remove (params: any) { +export async function remove (params: CarItem) { const response = await fetch('/api/v1/cars', { method: 'DELETE', headers: { diff --git a/src/api/context/BodyType.tsx b/src/api/context/BodyType.tsx index cca37f9..8fd4b5d 100644 --- a/src/api/context/BodyType.tsx +++ b/src/api/context/BodyType.tsx @@ -3,13 +3,11 @@ import React, { createContext, useContext, useState, useEffect, ReactNode } from 'react'; import { list } from "@/api/bodyTypes"; -interface BodyTypeItem { +export interface BodyTypeItem { id: string; name: string; - country: string; } - interface BodyTypeContextType { bodyTypes: BodyTypeItem[] | null; setBodyTypes: (content: BodyTypeItem[] | null) => void; @@ -19,7 +17,7 @@ interface BodyTypeContextType { const BodyTypeContext = createContext(undefined); export const BodyTypeProvider = ({ children }: { children: ReactNode }) => { - const [bodyTypes, setBodyTypes] = useState(null); + const [bodyTypes, setBodyTypes] = useState(null); const fetchData = async () => { setBodyTypes(await list()); diff --git a/src/api/context/Car.tsx b/src/api/context/Car.tsx index 2b9afe2..c1d6225 100644 --- a/src/api/context/Car.tsx +++ b/src/api/context/Car.tsx @@ -3,7 +3,7 @@ import React, { createContext, useContext, useState, useEffect, ReactNode } from 'react'; import { list } from "@/api/cars"; -interface CarItem { +export interface CarItem { id: string, car_models_id: string, engines_id: string, @@ -22,7 +22,7 @@ interface CarContextType { const CarContext = createContext(undefined); export const CarProvider = ({ children }: { children: ReactNode }) => { - const [car, setCar] = useState(null); + const [car, setCar] = useState(null); const fetchData = async () => { setCar(await list()); diff --git a/src/api/context/CarBrand.tsx b/src/api/context/CarBrand.tsx index bcebe08..cb64fe5 100644 --- a/src/api/context/CarBrand.tsx +++ b/src/api/context/CarBrand.tsx @@ -3,7 +3,7 @@ import React, { createContext, useContext, useState, useEffect, ReactNode } from 'react'; import { list } from "@/api/carBrands"; -interface CarBrandItem { +export interface CarBrandItem { id: string; name: string; country: string; @@ -18,7 +18,7 @@ interface CarBrandContextType { const CarBrandContext = createContext(undefined); export const CarBrandProvider = ({ children }: { children: ReactNode }) => { - const [carBrands, setCarBrands] = useState(null); + const [carBrands, setCarBrands] = useState(null); const fetchData = async () => { setCarBrands(await list()); diff --git a/src/api/context/CarColor.tsx b/src/api/context/CarColor.tsx index abe02e2..8da0fd6 100644 --- a/src/api/context/CarColor.tsx +++ b/src/api/context/CarColor.tsx @@ -3,8 +3,7 @@ import React, { createContext, useContext, useState, useEffect, ReactNode } from 'react'; import { list } from "@/api/carColors"; -// Define types for carColor item -interface CarColorItem { +export interface CarColorItem { id: string; name: string; hexCode: string; diff --git a/src/api/context/CarModel.tsx b/src/api/context/CarModel.tsx index c096f17..ae2fbab 100644 --- a/src/api/context/CarModel.tsx +++ b/src/api/context/CarModel.tsx @@ -3,7 +3,7 @@ import React, { createContext, useContext, useState, useEffect, ReactNode } from 'react'; import { list } from "@/api/carModels"; -interface CarModelItem { +export interface CarModelItem { id: string; name: string; yearStart: string, @@ -20,7 +20,7 @@ interface CarModelContextType { const CarModelContext = createContext(undefined); export const CarModelProvider = ({ children }: { children: ReactNode }) => { - const [carModel, setCarModel] = useState(null); + const [carModel, setCarModel] = useState(null); const fetchData = async () => { setCarModel(await list()); diff --git a/src/api/context/Customer.tsx b/src/api/context/Customer.tsx index c366abc..4f26283 100644 --- a/src/api/context/Customer.tsx +++ b/src/api/context/Customer.tsx @@ -3,7 +3,7 @@ import React, { createContext, useContext, useState, useEffect, ReactNode } from 'react'; import { list } from "@/api/customers"; -interface CustomerItem { +export interface CustomerItem { id: string; name: string; phone: string; @@ -19,7 +19,7 @@ interface CustomerContextType { const CustomerContext = createContext(undefined); export const CustomerProvider = ({ children }: { children: ReactNode }) => { - const [customers, setCustomers] = useState([]); + const [customers, setCustomers] = useState([]); const fetchData = async () => { setCustomers(await list()); diff --git a/src/api/context/Engine.tsx b/src/api/context/Engine.tsx index d8a9a24..101bf2b 100644 --- a/src/api/context/Engine.tsx +++ b/src/api/context/Engine.tsx @@ -3,7 +3,7 @@ import React, { createContext, useContext, useState, useEffect, ReactNode } from 'react'; import { list } from "@/api/engines"; -interface EngineItem { +export interface EngineItem { id: string, type: string, powerHR: string, @@ -19,7 +19,7 @@ interface EngineContextType { const EngineContext = createContext(undefined); export const EngineProvider = ({ children }: { children: ReactNode }) => { - const [engine, setEngine] = useState(null); + const [engine, setEngine] = useState(null); const fetchData = async () => { setEngine(await list()); diff --git a/src/api/context/Sale.tsx b/src/api/context/Sale.tsx index 6573fa3..3a594b2 100644 --- a/src/api/context/Sale.tsx +++ b/src/api/context/Sale.tsx @@ -3,7 +3,7 @@ import React, { createContext, useContext, useState, useEffect, ReactNode } from 'react'; import { list } from "@/api/sales"; -interface SaleItem { +export interface SaleItem { id: string, date: string, price: string, @@ -20,7 +20,7 @@ interface SaleContextType { const SaleContext = createContext(undefined); export const SaleProvider = ({ children }: { children: ReactNode }) => { - const [sale, setSale] = useState(null); + const [sale, setSale] = useState(null); const fetchData = async () => { setSale(await list()); diff --git a/src/api/context/Transmission.tsx b/src/api/context/Transmission.tsx index 5370223..f85e01b 100644 --- a/src/api/context/Transmission.tsx +++ b/src/api/context/Transmission.tsx @@ -3,7 +3,7 @@ import React, { createContext, useContext, useState, useEffect, ReactNode } from 'react'; import { list } from "@/api/transmissions"; -interface TransmissionItem { +export interface TransmissionItem { id: string, type: string, } @@ -17,7 +17,7 @@ interface TransmissionContextType { const TransmissionContext = createContext(undefined); export const TransmissionProvider = ({ children }: { children: ReactNode }) => { - const [transmission, setTransmission] = useState(null); + const [transmission, setTransmission] = useState(null); const fetchData = async () => { setTransmission(await list()); diff --git a/src/api/context/Trim.tsx b/src/api/context/Trim.tsx index 81fd309..4553bb2 100644 --- a/src/api/context/Trim.tsx +++ b/src/api/context/Trim.tsx @@ -3,7 +3,7 @@ import React, { createContext, useContext, useState, useEffect, ReactNode } from 'react'; import { list } from "@/api/trims"; -interface TrimItem { +export interface TrimItem { id: string; name: string, price: string, @@ -19,7 +19,7 @@ interface TrimContextType { const TrimContext = createContext(undefined); export const TrimProvider = ({ children }: { children: ReactNode }) => { - const [trim, setTrim] = useState(null); + const [trim, setTrim] = useState(null); const fetchData = async () => { setTrim(await list()); diff --git a/src/api/customers.ts b/src/api/customers.ts index 6bd7b71..8b63e3e 100644 --- a/src/api/customers.ts +++ b/src/api/customers.ts @@ -1,9 +1,11 @@ +import {CustomerItem} from "@/api/context/Customer"; + export async function list () { const response = await fetch('/api/v1/customers'); return (await response.json()).results.rows; } -export async function add (params: any) { +export async function add (params: CustomerItem) { const response = await fetch('/api/v1/customers', { method: 'POST', headers: { @@ -14,7 +16,7 @@ export async function add (params: any) { return await response.json(); } -export async function update (params: any) { +export async function update (params: CustomerItem) { const response = await fetch('/api/v1/customers', { method: 'PUT', headers: { @@ -30,7 +32,7 @@ export async function update (params: any) { return await response.json(); } -export async function remove (params: any) { +export async function remove (params: CustomerItem) { const response = await fetch('/api/v1/customers', { method: 'DELETE', headers: { diff --git a/src/api/engines.ts b/src/api/engines.ts index 413a3ac..cd5fbd2 100644 --- a/src/api/engines.ts +++ b/src/api/engines.ts @@ -1,9 +1,11 @@ +import {EngineItem} from "@/api/context/Engine"; + export async function list () { const response = await fetch('/api/v1/engines'); return (await response.json()).results.rows; } -export async function add (params: any) { +export async function add (params: EngineItem) { const response = await fetch('/api/v1/engines', { method: 'POST', headers: { @@ -14,7 +16,7 @@ export async function add (params: any) { return await response.json(); } -export async function update (params: any) { +export async function update (params: EngineItem) { const response = await fetch('/api/v1/engines', { method: 'PUT', headers: { @@ -30,7 +32,7 @@ export async function update (params: any) { return await response.json(); } -export async function remove (params: any) { +export async function remove (params: EngineItem) { const response = await fetch('/api/v1/engines', { method: 'DELETE', headers: { diff --git a/src/api/sales.ts b/src/api/sales.ts index d82a076..297487f 100644 --- a/src/api/sales.ts +++ b/src/api/sales.ts @@ -1,9 +1,11 @@ +import {SaleItem} from "@/api/context/Sale"; + export async function list () { const response = await fetch('/api/v1/sales'); return (await response.json()).results.rows; } -export async function add (params: any) { +export async function add (params: SaleItem) { const response = await fetch('/api/v1/sales', { method: 'POST', headers: { @@ -14,7 +16,7 @@ export async function add (params: any) { return await response.json(); } -export async function update (params: any) { +export async function update (params: SaleItem) { const response = await fetch('/api/v1/sales', { method: 'PUT', headers: { @@ -30,7 +32,7 @@ export async function update (params: any) { return await response.json(); } -export async function remove (params: any) { +export async function remove (params: SaleItem) { const response = await fetch('/api/v1/sales', { method: 'DELETE', headers: { diff --git a/src/api/transmissions.ts b/src/api/transmissions.ts index 44a0cc8..43070b7 100644 --- a/src/api/transmissions.ts +++ b/src/api/transmissions.ts @@ -1,9 +1,11 @@ +import {TransmissionItem} from "@/api/context/Transmission"; + export async function list () { const response = await fetch('/api/v1/transmissions'); return (await response.json()).results.rows; } -export async function add (params: any) { +export async function add (params: TransmissionItem) { const response = await fetch('/api/v1/transmissions', { method: 'POST', headers: { @@ -14,7 +16,7 @@ export async function add (params: any) { return await response.json(); } -export async function update (params: any) { +export async function update (params: TransmissionItem) { const response = await fetch('/api/v1/transmissions', { method: 'PUT', headers: { @@ -30,7 +32,7 @@ export async function update (params: any) { return await response.json(); } -export async function remove (params: any) { +export async function remove (params: TransmissionItem) { const response = await fetch('/api/v1/transmissions', { method: 'DELETE', headers: { diff --git a/src/api/trims.ts b/src/api/trims.ts index f147e75..7fe4056 100644 --- a/src/api/trims.ts +++ b/src/api/trims.ts @@ -1,9 +1,11 @@ +import {TrimItem} from "@/api/context/Trim"; + export async function list () { const response = await fetch('/api/v1/trims'); return (await response.json()).results.rows; } -export async function add (params: any) { +export async function add (params: TrimItem) { const response = await fetch('/api/v1/trims', { method: 'POST', headers: { @@ -14,7 +16,7 @@ export async function add (params: any) { return await response.json(); } -export async function update (params: any) { +export async function update (params: TrimItem) { const response = await fetch('/api/v1/trims', { method: 'PUT', headers: { @@ -30,7 +32,7 @@ export async function update (params: any) { return await response.json(); } -export async function remove (params: any) { +export async function remove (params: TrimItem) { const response = await fetch('/api/v1/trims', { method: 'DELETE', headers: { diff --git a/src/components/Content/Content.tsx b/src/components/Content/Content.tsx index 2099dff..922d3fc 100644 --- a/src/components/Content/Content.tsx +++ b/src/components/Content/Content.tsx @@ -1,6 +1,9 @@ import './Content.css'; +import {ReactNode} from "react"; -export default function Content({children}:any) { +export default function Content({children}:{ + children: ReactNode; +}) { return (
{children} diff --git a/src/components/Input/Input.tsx b/src/components/Input/Input.tsx index 07df86c..f66bbc5 100644 --- a/src/components/Input/Input.tsx +++ b/src/components/Input/Input.tsx @@ -1,7 +1,12 @@ -import React from 'react'; +import React, { ChangeEvent } from 'react'; import './Input.css' -export function Input({children, name, value, onChange}: any) { +export function Input({children, name, value, onChange}: { + children?: string; + name: string; + value: string; + onChange: (event: ChangeEvent) => void; +}) { return ( <> diff --git a/src/components/Input/InputColor.tsx b/src/components/Input/InputColor.tsx index 9691881..ff9a269 100644 --- a/src/components/Input/InputColor.tsx +++ b/src/components/Input/InputColor.tsx @@ -1,7 +1,11 @@ -import React from 'react'; +import React, {ChangeEvent} from 'react'; import './InputColor.css' -export function InputColor({children, value, onChange, name}: any) { +export function InputColor({value, onChange, name}: { + name: string; + value?: string; + onChange: (event: ChangeEvent) => void; +}) { return ( <> diff --git a/src/components/Input/InputDate.tsx b/src/components/Input/InputDate.tsx index 0fe0eac..6c9ecba 100644 --- a/src/components/Input/InputDate.tsx +++ b/src/components/Input/InputDate.tsx @@ -1,8 +1,13 @@ -import React from 'react'; +import React, {ChangeEvent} from 'react'; import './InputDate.css' import {format} from "date-fns"; -export function InputDate({children, value, onChange, name}: any) { +export function InputDate({children, value, onChange, name}: { + children?: string; + name: string; + value: string; + onChange: (event: ChangeEvent) => void; +}) { return ( <> diff --git a/src/components/Modal/Modal.tsx b/src/components/Modal/Modal.tsx index 21ff5f5..a74afc0 100644 --- a/src/components/Modal/Modal.tsx +++ b/src/components/Modal/Modal.tsx @@ -1,7 +1,10 @@ import './Modal.css'; import {useModalContext} from "@/components/Modal/ModalContext"; +import {ReactNode} from "react"; -export default function Modal({children}:any) { +export default function Modal({children}:{ + children: ReactNode; +}) { const { setContentModal } = useModalContext(); return ( diff --git a/src/components/NavBar/NavBar.tsx b/src/components/NavBar/NavBar.tsx index dda4892..9cd347c 100644 --- a/src/components/NavBar/NavBar.tsx +++ b/src/components/NavBar/NavBar.tsx @@ -1,8 +1,11 @@ "use client"; import './NavBar.css'; +import {ReactNode} from "react"; -export default function NavBar({children}:any) { +export default function NavBar({children}:{ + children: ReactNode; +}) { return (
    {children} diff --git a/src/components/Select/Select.tsx b/src/components/Select/Select.tsx index 27e92af..3dc7836 100644 --- a/src/components/Select/Select.tsx +++ b/src/components/Select/Select.tsx @@ -1,12 +1,26 @@ import React from 'react'; -import ReactSelect from "react-select"; +import ReactSelect, { SingleValue } from "react-select"; -export function Select({options, placeholder, value, onChange, name}: any) { +interface OptionType { + value: string | number; + label: string; +} + +interface SelectProps { + options: OptionType[]; + placeholder: string; + value: string | number | null; + onChange: (selectedOption: SingleValue) => void; + name: string; +} + + +export function Select({options, placeholder, value, onChange, name}: SelectProps) { return ( <> option.value === value)} + value={options.find((option) => option.value === value)} onChange={onChange} name={name}/> ); diff --git a/src/components/Table/Row.tsx b/src/components/Table/Row.tsx index 0ff9fc8..5296844 100644 --- a/src/components/Table/Row.tsx +++ b/src/components/Table/Row.tsx @@ -1,6 +1,8 @@ -import React from 'react'; +import React, {ReactNode} from 'react'; -export function Row({children}: any) { +export function Row({children}: { + children: ReactNode; +}) { return ( {children} ); diff --git a/src/components/Table/Rows.tsx b/src/components/Table/Rows.tsx index 6a04fed..5968e38 100644 --- a/src/components/Table/Rows.tsx +++ b/src/components/Table/Rows.tsx @@ -1,6 +1,8 @@ -import React from 'react'; +import React, {ReactNode} from 'react'; -export function Rows({children}: any) { +export function Rows({children}: { + children: ReactNode; +}) { return ( {children} diff --git a/src/components/Table/Table.tsx b/src/components/Table/Table.tsx index 1e2e387..7a5cccd 100644 --- a/src/components/Table/Table.tsx +++ b/src/components/Table/Table.tsx @@ -1,14 +1,17 @@ -import React from 'react'; +import React, {ReactNode} from 'react'; import "./Table.css" -export function Table({ header, children }: any) { +export function Table({ header, children }: { + header: string[]; + children: ReactNode; +}) { return (
    { - header.map((item: any, index: number) => ( + header.map((item: string, index: number) => ( )) } diff --git a/src/pages/Sale.tsx b/src/pages/Sale.tsx index 8f4d5ed..db10608 100644 --- a/src/pages/Sale.tsx +++ b/src/pages/Sale.tsx @@ -5,7 +5,6 @@ import {useModalContext} from "@/components/Modal/ModalContext"; import SaleModal from "@/modals/Sale"; import {Rows} from "@/components/Table/Rows"; import {Row} from "@/components/Table/Row"; -import CarModelsModal from "@/modals/CarModel"; import {remove} from "@/api/sales"; import {useSaleContext} from "@/api/context/Sale"; import {useCarContext} from "@/api/context/Car";
    {item}