refactor: update tag data structure and improve tag handling

- Changed `TagsResponse` and `UseTagsState` to include `usage` count in the tag data structure for better tracking.
- Simplified tag initialization in `useTags` to directly use `initialData`.
- Enhanced `TagsPageClient` to filter and sort tags based on usage, improving user experience in tag management.
- Removed unused variables and streamlined the search functionality for better performance.
This commit is contained in:
Julien Froidefond
2025-09-15 09:29:38 +02:00
parent fc20154ef6
commit 631da57ea2
3 changed files with 142 additions and 156 deletions

View File

@@ -21,7 +21,7 @@ export interface TagFilters {
// Types pour les réponses
export interface TagsResponse {
data: Tag[];
data: Array<Tag & { usage: number }>;
message: string;
}