|
|
@@ -72,15 +72,15 @@ export function SearchConditionContextProvider({ children }: Props) { |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
console.log("compare condition", { |
|
|
|
|
|
before, |
|
|
|
|
|
after, |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
// console.log("compare condition", { |
|
|
|
|
|
// before, |
|
|
|
|
|
// after, |
|
|
|
|
|
// }); |
|
|
if (!isEqual(before, after)) { |
|
|
if (!isEqual(before, after)) { |
|
|
console.log("add condition", { |
|
|
|
|
|
before, |
|
|
|
|
|
after, |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
// console.log("add condition", { |
|
|
|
|
|
// before, |
|
|
|
|
|
// after, |
|
|
|
|
|
// }); |
|
|
setCondition(after, "addCondition"); |
|
|
setCondition(after, "addCondition"); |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
@@ -105,12 +105,11 @@ export function SearchConditionContextProvider({ children }: Props) { |
|
|
const clearCondition = () => { |
|
|
const clearCondition = () => { |
|
|
setCondition({}, "clearCondition"); |
|
|
setCondition({}, "clearCondition"); |
|
|
setInitialized(false); |
|
|
setInitialized(false); |
|
|
console.log("clearCondition"); |
|
|
|
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
useEffect(() => { |
|
|
if (initialized) { |
|
|
if (initialized) { |
|
|
console.log("call applyToURL", { condition, initialized }); |
|
|
|
|
|
|
|
|
// console.log("call applyToURL", { condition, initialized }); |
|
|
applyToURL(); |
|
|
applyToURL(); |
|
|
} |
|
|
} |
|
|
}, [condition, initialized]); |
|
|
}, [condition, initialized]); |
|
|
|