From 5f23f64af042e0ee80ca714898cbfc22689769d2 Mon Sep 17 00:00:00 2001 From: zvoverman Date: Fri, 10 May 2024 13:11:38 -0600 Subject: [PATCH] clean up card # cap code + github actions test --- src/components/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index 2e887b0..120fdfb 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -8,7 +8,7 @@ function App() { const handleInputChange = (event: any) => { const value = parseInt(event.target.value); - let result = value > 50 ? 50 : value; // while , greater numbers can be entered into the input -> ensure maximum of 50 to limit API calls + let result = Math.min(value, 50); // while , greater numbers can be entered into the input -> ensure maximum of 50 to limit API calls console.log(result); setLength(result); };