Skip to content

Commit ae039bb

Browse files
Merge pull request #29 from vladshcherbin/typescript-errors
Update ts version
2 parents f5749cf + 4553a25 commit ae039bb

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"react-scripts": "3.4.1",
4545
"serverless": "^2.29.0",
4646
"serverless-finch": "^2.6.0",
47-
"typescript": "~3.7.2",
47+
"typescript": "~4.3.5",
4848
"yup": "^0.29.1"
4949
},
5050
"devDependencies": {

src/components/pages/PageOrder/PageOrder.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ const Form = (props: FormikProps<FormikValues>) => {
9999
}
100100

101101
export default function PageOrder() {
102-
const {id} = useParams();
102+
const {id} = useParams<{ id: string }>();
103103
const [order, setOrder] = useState<any>({});
104104
const [cartItems, setCartItems] = useState<CartItem[]>([]);
105105
const [isLoading, setIsLoading] = useState<boolean>(true);
@@ -185,4 +185,4 @@ export default function PageOrder() {
185185
</TableContainer>
186186
</PaperLayout>
187187
);
188-
}
188+
}

src/components/pages/PageProductForm/PageProductForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ const emptyValues: any = ProductSchema.cast();
102102

103103
export default function PageProductForm() {
104104
const history = useHistory();
105-
const {id} = useParams();
105+
const {id} = useParams<{ id: string }>();
106106
const [product, setProduct] = useState<Product | null>(null);
107107
const [isLoading, setIsLoading] = useState<boolean>(true);
108108

@@ -141,4 +141,4 @@ export default function PageProductForm() {
141141
</Formik>
142142
</PaperLayout>
143143
);
144-
}
144+
}

0 commit comments

Comments
 (0)