diff --git a/src/components/layout/header/alarm/AlarmItem.tsx b/src/components/layout/header/alarm/AlarmItem.tsx index f59d184..83b66dd 100644 --- a/src/components/layout/header/alarm/AlarmItem.tsx +++ b/src/components/layout/header/alarm/AlarmItem.tsx @@ -70,20 +70,25 @@ const AlarmItem = ({ }; const handleClick = async () => { - if (alarm.type === 'notice') { - navigate('/guide'); - onClose(); - } - if (alarm.type === 'video' && !alarm.is_confirm && alarm.alarm_id !== 999) { + if (!alarm.is_confirm) { try { await confirmSelectAlarmAPI({ alarms: [alarm.alarm_id] }); onRefresh(); - navigate(`/summary/${alarm.video_id}`); - onClose(); } catch (e) { console.error(e); } } + if (alarm.type === 'notice') { + navigate('/guide'); + } + if ( + alarm.type === 'video' && + alarm.state === 'success' && + alarm.alarm_id !== 999 + ) { + navigate(`/summary/${alarm.video_id}`); + } + onClose(); }; const handleClickRemoveButton: React.MouseEventHandler = ( diff --git a/src/components/modals/AddCategoryModal.tsx b/src/components/modals/AddCategoryModal.tsx index fccc42f..3353c08 100644 --- a/src/components/modals/AddCategoryModal.tsx +++ b/src/components/modals/AddCategoryModal.tsx @@ -47,7 +47,6 @@ const AddCategoryModal = ({ isTopCategoryModalOpen ? setIsTopCategoryModalOpen(false) : setIsSubCategoryModalOpen(false); - setCategoryName(''); }; const [topCategoryModalRef] = useOutsideClick(onCloseModal); diff --git a/src/styles/category/Card.style.ts b/src/styles/category/Card.style.ts index eba2049..39802a5 100644 --- a/src/styles/category/Card.style.ts +++ b/src/styles/category/Card.style.ts @@ -47,6 +47,10 @@ export const DropdownWrap = styled.div` fill: ${(props) => props.theme.color.gray400}; } } + + &.changed { + background-color: ${theme.color.green400}; + } } `; diff --git a/src/styles/layout/header/alarm/AlarmItem.style.ts b/src/styles/layout/header/alarm/AlarmItem.style.ts index eb4e232..7b31746 100644 --- a/src/styles/layout/header/alarm/AlarmItem.style.ts +++ b/src/styles/layout/header/alarm/AlarmItem.style.ts @@ -2,6 +2,7 @@ import theme from '@/styles/theme'; import styled from 'styled-components'; export const Container = styled.div` + cursor: pointer !important; padding: 28px 0; display: flex; flex-direction: column;