refactor: remove debug logging from ClientLayout and PreferencesContext to clean up code and improve performance
This commit is contained in:
@@ -33,16 +33,6 @@ export default function ClientLayout({ children, initialLibraries = [], initialF
|
||||
const backgroundType = preferences.background.type;
|
||||
const komgaLibraries = preferences.background.komgaLibraries;
|
||||
|
||||
// Debug: log renders
|
||||
useEffect(() => {
|
||||
console.log('🎨 [ClientLayout] Render:', {
|
||||
pathname,
|
||||
backgroundType,
|
||||
hasLibraries: !!komgaLibraries?.length,
|
||||
preferencesKeys: Object.keys(preferences)
|
||||
});
|
||||
});
|
||||
|
||||
// Stabiliser libraryIds - ne change que si le contenu change vraiment
|
||||
const libraryIdsString = useMemo(() => {
|
||||
const newIds = komgaLibraries?.join(",") || "";
|
||||
|
||||
@@ -29,11 +29,6 @@ export function PreferencesProvider({
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [hasLoadedPrefs, setHasLoadedPrefs] = useState(!!initialPreferences);
|
||||
|
||||
// Debug: log state changes
|
||||
useEffect(() => {
|
||||
console.log('⚙️ [PreferencesContext] Update:', { status, hasLoadedPrefs, isLoading });
|
||||
}, [status, hasLoadedPrefs, isLoading]);
|
||||
|
||||
const fetchPreferences = async () => {
|
||||
try {
|
||||
const response = await fetch("/api/preferences");
|
||||
|
||||
Reference in New Issue
Block a user