[DetailPanel]
- savToLocalStorage 로직 수정 : recentItmes 에 expireTime 추가
This commit is contained in:
@@ -99,6 +99,7 @@ export default function ItemDetail() {
|
||||
}, [dispatch]);
|
||||
|
||||
const saveToLocalStorage = useCallback(() => {
|
||||
// recentlyViewed localstorage
|
||||
const recentItmes =
|
||||
JSON.parse(window.localStorage.getItem("recentItems")) || [];
|
||||
|
||||
@@ -120,6 +121,7 @@ export default function ItemDetail() {
|
||||
prdtId: selectedPrdtId,
|
||||
patnrId: selectedPatnrId,
|
||||
date: formattedDate,
|
||||
expireTime: currentDate.getTime() + 1000 * 60 * 60 * 24 * 14,
|
||||
cntryCd: httpHeader["X-Device-Country"],
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user