zeroed-some/localtoast / b83824c

Browse files

this linter is mad as a mutha

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
b83824c563e28c13d8926ee6b174c4f470767c27
Parents
7b8e987
Tree
0e7640b

1 changed file

StatusFile+-
M frontend/app/page.tsx 7 6
frontend/app/page.tsxmodified
@@ -67,8 +67,8 @@ function HomePage() {
6767
       alert('Toast rating added! 🍞');
6868
     },
6969
     onError: (error: unknown) => {
70
-      const err = error as any;
71
-      alert(err.response?.data?.error || 'Failed to add rating');
70
+      const apiError = error as ApiError;
71
+      alert(apiError.response?.data?.error || 'Failed to add rating');
7272
     },
7373
   });
7474
 
@@ -89,8 +89,8 @@ function HomePage() {
8989
       setSelectedRestaurant(null); // Close any open restaurant panel
9090
     },
9191
     onError: (error: unknown) => {
92
-      const err = error as any;
93
-      alert(err.response?.data?.error || 'Failed to search for places');
92
+      const apiError = error as ApiError;
93
+      alert(apiError.response?.data?.error || 'Failed to search for places');
9494
     },
9595
   });
9696
 
@@ -105,8 +105,9 @@ function HomePage() {
105105
         setRestaurants(updatedRestaurants);
106106
       }
107107
     },
108
-    onError: (error: ApiError) => {
109
-      alert(error.response?.data?.error || 'Failed to update toast status');
108
+    onError: (error: unknown) => {
109
+      const apiError = error as ApiError;
110
+      alert(apiError.response?.data?.error || 'Failed to update toast status');
110111
     },
111112
   });
112113