mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 05:51:23 -05:00
Fix ESLint errors
This commit is contained in:
@@ -173,7 +173,7 @@ const activityTypeConfig = {
|
||||
};
|
||||
|
||||
export const SystemActivityLog = forwardRef<SystemActivityLogRef, SystemActivityLogProps>(
|
||||
({ limit = 50, showFilters = true }, ref) => {
|
||||
({ limit = 50, showFilters = true }, ref): React.JSX.Element => {
|
||||
const [activities, setActivities] = useState<SystemActivity[]>([]);
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
const [isRefreshing, setIsRefreshing] = useState(false);
|
||||
@@ -182,7 +182,7 @@ export const SystemActivityLog = forwardRef<SystemActivityLogRef, SystemActivity
|
||||
const [searchQuery, setSearchQuery] = useState('');
|
||||
const [showFiltersPanel, setShowFiltersPanel] = useState(false);
|
||||
|
||||
const loadActivities = async (showLoader = true) => {
|
||||
const loadActivities = async (showLoader = true): Promise<void> => {
|
||||
if (showLoader) {
|
||||
setIsLoading(true);
|
||||
} else {
|
||||
@@ -201,19 +201,20 @@ export const SystemActivityLog = forwardRef<SystemActivityLogRef, SystemActivity
|
||||
}
|
||||
};
|
||||
|
||||
const handleRefresh = () => {
|
||||
loadActivities(false);
|
||||
const handleRefresh = (): void => {
|
||||
void loadActivities(false);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
loadActivities();
|
||||
void loadActivities();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [limit, filterType]);
|
||||
|
||||
useImperativeHandle(ref, () => ({
|
||||
refresh: loadActivities,
|
||||
}));
|
||||
|
||||
const toggleExpanded = (id: string) => {
|
||||
const toggleExpanded = (id: string): void => {
|
||||
setExpandedIds(prev => {
|
||||
const next = new Set(prev);
|
||||
if (next.has(id)) {
|
||||
@@ -225,7 +226,7 @@ export const SystemActivityLog = forwardRef<SystemActivityLogRef, SystemActivity
|
||||
});
|
||||
};
|
||||
|
||||
const clearFilters = () => {
|
||||
const clearFilters = (): void => {
|
||||
setFilterType('all');
|
||||
setSearchQuery('');
|
||||
};
|
||||
@@ -258,7 +259,7 @@ export const SystemActivityLog = forwardRef<SystemActivityLogRef, SystemActivity
|
||||
return false;
|
||||
});
|
||||
|
||||
const renderActivityDetails = (activity: SystemActivity) => {
|
||||
const renderActivityDetails = (activity: SystemActivity): React.JSX.Element => {
|
||||
const isExpanded = expandedIds.has(activity.id);
|
||||
|
||||
switch (activity.type) {
|
||||
|
||||
Reference in New Issue
Block a user