[상품 상세] 개발 진행중 - UserReviews 기능 개선 및 UI 개선
- UserReviews 컴포넌트 리팩토링 및 페이지네이션 구현 - 새로운 hooks/useReviews 훅 추가 - DetailPanel UI/UX 개선 및 스타일 업데이트 - 이미지 스켈레톤 로딩 컴포넌트 추가 - THeaderDetail 컴포넌트 신규 추가 - 유틸리티 함수 확장 (fpHelpers.js)
This commit is contained in:
@@ -95,6 +95,36 @@ const disableConsole = () => {
|
||||
console.info = function () {};
|
||||
};
|
||||
|
||||
// console.log 자동 Object 직렬화 오버라이드
|
||||
const originalConsoleLog = console.log;
|
||||
const originalConsoleError = console.error;
|
||||
const originalConsoleWarn = console.warn;
|
||||
|
||||
const processArgs = (args) => {
|
||||
return args.map(arg => {
|
||||
if (typeof arg === 'object' && arg !== null && !Array.isArray(arg)) {
|
||||
try {
|
||||
return JSON.stringify(arg, null, 2);
|
||||
} catch (e) {
|
||||
return `[Object: ${e.message}]`;
|
||||
}
|
||||
}
|
||||
return arg;
|
||||
});
|
||||
};
|
||||
|
||||
console.log = function(...args) {
|
||||
originalConsoleLog.apply(console, processArgs(args));
|
||||
};
|
||||
|
||||
console.error = function(...args) {
|
||||
originalConsoleError.apply(console, processArgs(args));
|
||||
};
|
||||
|
||||
console.warn = function(...args) {
|
||||
originalConsoleWarn.apply(console, processArgs(args));
|
||||
};
|
||||
|
||||
const originFocus = Spotlight.focus;
|
||||
Spotlight.focus = function (elem, containerOption) {
|
||||
const ret = originFocus.apply(this, [elem, containerOption]); // this 바인딩을 유지하여 originFocus 호출
|
||||
|
||||
Reference in New Issue
Block a user