mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 21:03:08 +00:00
refactor: remove duplicate logger initialization in useCliStatus hook
- Eliminated redundant logger declaration within the useCliStatus hook to improve code clarity and prevent potential performance issues. - This change enhances the maintainability of the code by ensuring the logger is created only once outside the hook.
This commit is contained in:
@@ -7,7 +7,6 @@ interface UseCliStatusOptions {
|
|||||||
setCliStatus: (status: any) => void;
|
setCliStatus: (status: any) => void;
|
||||||
setAuthStatus: (status: any) => void;
|
setAuthStatus: (status: any) => void;
|
||||||
}
|
}
|
||||||
const logger = createLogger('CliStatus');
|
|
||||||
|
|
||||||
// Create logger once outside the hook to prevent infinite re-renders
|
// Create logger once outside the hook to prevent infinite re-renders
|
||||||
const logger = createLogger('CliStatus');
|
const logger = createLogger('CliStatus');
|
||||||
|
|||||||
Reference in New Issue
Block a user