| @@ -213,8 +213,9 @@ | ||
| 213 | 213 | </div> |
| 214 | 214 | ), |
| 215 | 215 | }, |
| 216 | 216 | ], |
| 217 | + // eslint-disable-next-line react-hooks/exhaustive-deps | |
| 217 | 218 | [visibleColumns], |
| 218 | 219 | ); |
| 219 | 220 | |
| 220 | 221 | // Toggle column visibility |
| @@ -318,12 +319,13 @@ | ||
| 318 | 319 | } catch (error) { |
| 319 | 320 | return null; |
| 320 | 321 | } |
| 321 | 322 | }, |
| 322 | - enabled: can("manage_yatra"), | |
| 323 | + enabled: can("yatra_access_admin"), | |
| 323 | 324 | staleTime: 5 * 60 * 1000, // Cache for 5 minutes |
| 324 | 325 | }); |
| 325 | 326 | |
| 327 | + // eslint-disable-next-line react-hooks/exhaustive-deps | |
| 326 | 328 | const activities = data?.data || []; |
| 327 | 329 | const total = data?.total || 0; |
| 328 | 330 | const totalPages = Math.ceil(total / 10); |
| 329 | 331 | const errorContext = getErrorContext(error); |