Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions client/src/components/education/StrikeDetailsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export const StrikeDetailsModal = ({
setStrikeFields(strikeToEdit);
setIsEditMode(true);
return;
} else {
setIsEditMode(false);
}
resetForm();
}, [strikeToEdit]);
Expand Down Expand Up @@ -111,6 +113,7 @@ export const StrikeDetailsModal = ({
onConfirmEdit(strikeFields);
} else {
onConfirmAdd(strikeFields);
resetForm();
}
};

Expand Down
1 change: 1 addition & 0 deletions client/src/components/education/StrikesComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export const StrikesComponent = () => {
* Function to enable adding strikes.
*/
const onClickAdd = () => {
setStrikeToEdit(null);
setIsModalOpen(true);
};

Expand Down
7 changes: 5 additions & 2 deletions client/src/components/education/StrikesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export const StrikesList: React.FC<StrikesListProps> = ({ strikes, onClickEdit,
alignItems="flex-start"
disablePadding
sx={{
paddingBottom: 1,
bgcolor: index % 2 === 0 ? '#f8f9fa' : 'background.paper',
}}
>
Expand Down Expand Up @@ -95,7 +94,11 @@ export const StrikesList: React.FC<StrikesListProps> = ({ strikes, onClickEdit,
<Typography sx={{ paddingRight: 2 }}>{formatDateForDisplay(strike.date)}</Typography>
</Box>
}
secondary={<MarkdownText>{strike.comments}</MarkdownText>}
secondary={
<Box mt={-2}>
<MarkdownText>{strike.comments}</MarkdownText>
</Box>
}
/>
{renderActions(strike.id)}
</ListItem>
Expand Down
Loading