refactor: streamline ClientLayout and PreferencesContext for improved state management and debugging

This commit is contained in:
Julien Froidefond
2025-10-24 17:17:35 +02:00
parent 58cabd9cf2
commit 931185f0f0
7 changed files with 63 additions and 33 deletions

View File

@@ -0,0 +1,11 @@
/**
* Génère l'URL de base pour une image (sans cache version)
* Utilisez useImageUrl() dans les composants pour obtenir l'URL avec cache busting
*/
export function getImageUrl(type: "series" | "book", id: string) {
if (type === "series") {
return `/api/komga/images/series/${id}/thumbnail`;
}
return `/api/komga/images/books/${id}/thumbnail`;
}