refactor: update Kanban component imports and streamline filters
- Replaced direct imports of `KanbanFilters` with type imports from `@/lib/types` across multiple components for consistency. - Simplified `KanbanPageClient` by integrating `DesktopControls` for better organization and readability, removing redundant desktop control code. - Ensured `compactView` is explicitly typed as boolean in relevant components to enhance type safety.
This commit is contained in:
@@ -6,7 +6,7 @@ import { useTags } from '@/hooks/useTags';
|
||||
import { useUserPreferences } from './UserPreferencesContext';
|
||||
import { Task, Tag, TaskStats, TaskStatus } from '@/lib/types';
|
||||
import { CreateTaskData, TaskFilters } from '@/clients/tasks-client';
|
||||
import { KanbanFilters } from '@/components/kanban/KanbanFilters';
|
||||
import type { KanbanFilters } from '@/lib/types';
|
||||
import { sortTasks, getSortOption, DEFAULT_SORT, createSortKey } from '@/lib/sort-config';
|
||||
|
||||
interface TasksContextType {
|
||||
@@ -94,9 +94,9 @@ export function TasksProvider({ children, initialTasks, initialTags, initialStat
|
||||
};
|
||||
|
||||
const viewPreferenceUpdates = {
|
||||
compactView: newFilters.compactView,
|
||||
swimlanesByTags: newFilters.swimlanesByTags,
|
||||
swimlanesMode: newFilters.swimlanesMode
|
||||
compactView: newFilters.compactView as boolean,
|
||||
swimlanesByTags: newFilters.swimlanesByTags as boolean,
|
||||
swimlanesMode: newFilters.swimlanesMode as 'tags' | 'priority'
|
||||
};
|
||||
|
||||
// Mettre à jour via UserPreferencesContext
|
||||
|
||||
Reference in New Issue
Block a user