Skip to content

Commit

Permalink
Merge pull request #125 from teamViNO/hotfix-082
Browse files Browse the repository at this point in the history
hotfix-082: 데모데이 전 수정사항
  • Loading branch information
gs0428 authored Feb 20, 2024
2 parents 044a325 + e802532 commit e9f915e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
19 changes: 12 additions & 7 deletions src/components/layout/header/alarm/AlarmItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<HTMLButtonElement> = (
Expand Down
1 change: 0 additions & 1 deletion src/components/modals/AddCategoryModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ const AddCategoryModal = ({
isTopCategoryModalOpen
? setIsTopCategoryModalOpen(false)
: setIsSubCategoryModalOpen(false);
setCategoryName('');
};

const [topCategoryModalRef] = useOutsideClick<HTMLDivElement>(onCloseModal);
Expand Down
4 changes: 4 additions & 0 deletions src/styles/category/Card.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export const DropdownWrap = styled.div`
fill: ${(props) => props.theme.color.gray400};
}
}
&.changed {
background-color: ${theme.color.green400};
}
}
`;

Expand Down
1 change: 1 addition & 0 deletions src/styles/layout/header/alarm/AlarmItem.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e9f915e

Please sign in to comment.