diff --git a/package.json b/package.json index 09ea4ff74..aacb6d36a 100755 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "react-scripts": "3.4.1", "serverless": "^2.29.0", "serverless-finch": "^2.6.0", - "typescript": "~3.7.2", + "typescript": "~4.3.5", "yup": "^0.29.1" }, "devDependencies": { diff --git a/src/components/pages/PageOrder/PageOrder.tsx b/src/components/pages/PageOrder/PageOrder.tsx index bcb489577..5da92dcaf 100755 --- a/src/components/pages/PageOrder/PageOrder.tsx +++ b/src/components/pages/PageOrder/PageOrder.tsx @@ -99,7 +99,7 @@ const Form = (props: FormikProps) => { } export default function PageOrder() { - const {id} = useParams(); + const {id} = useParams<{ id: string }>(); const [order, setOrder] = useState({}); const [cartItems, setCartItems] = useState([]); const [isLoading, setIsLoading] = useState(true); @@ -185,4 +185,4 @@ export default function PageOrder() { ); -} \ No newline at end of file +} diff --git a/src/components/pages/PageProductForm/PageProductForm.tsx b/src/components/pages/PageProductForm/PageProductForm.tsx index 23417b119..ca985f093 100755 --- a/src/components/pages/PageProductForm/PageProductForm.tsx +++ b/src/components/pages/PageProductForm/PageProductForm.tsx @@ -102,7 +102,7 @@ const emptyValues: any = ProductSchema.cast(); export default function PageProductForm() { const history = useHistory(); - const {id} = useParams(); + const {id} = useParams<{ id: string }>(); const [product, setProduct] = useState(null); const [isLoading, setIsLoading] = useState(true); @@ -141,4 +141,4 @@ export default function PageProductForm() { ); -} \ No newline at end of file +}