Skip to content

Commit 383e282

Browse files
committed
Fix styles
1 parent a35d7de commit 383e282

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

hwproj.front/src/components/Solutions/TaskSolutionComponent.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import CheckIcon from '@mui/icons-material/Done';
2323
import WarningIcon from '@mui/icons-material/Warning';
2424
import CloseIcon from '@mui/icons-material/Close';
2525
import {useSnackbar} from 'notistack';
26+
import StudentStatsUtils from "../../services/StudentStatsUtils";
2627

2728
interface ISolutionProps {
2829
solution: GetSolutionModel | undefined,
@@ -267,12 +268,12 @@ const TaskSolutionComponent: FC<ISolutionProps> = (props) => {
267268
state.clickedForRate || !isRated ? {backgroundColor: undefined, color: undefined}
268269
: rating >= 70
269270
? {backgroundColor: "rgb(237,247,237)", color: "rgb(30,70,32)"}
270-
: rating <= 30
271+
: rating <= 34
271272
? {backgroundColor: "rgb(253,237,237)", color: "rgb(95,33,32)"}
272273
: {backgroundColor: "rgb(255,244,229)", color: "rgb(102,60,0)"}
273274
return <Card variant={"outlined"}
274275
sx={{
275-
border: isRated && !state.clickedForRate ? "none" : "",
276+
borderColor: state.clickedForRate || isRated ? StudentStatsUtils.getRatingColor(points, maxRating) : "",
276277
width: "100%",
277278
backgroundColor: backgroundColor,
278279
color: color
@@ -318,11 +319,11 @@ const TaskSolutionComponent: FC<ISolutionProps> = (props) => {
318319
}))
319320
}}
320321
/>
321-
</Grid>
322+
</Grid>
322323
: isRated &&
323324
<Grid item>
324325
<MarkdownPreview
325-
value={lecturerComment}
326+
value={lecturerComment}
326327
backgroundColor={backgroundColor}
327328
textColor={color}
328329
/>

0 commit comments

Comments
 (0)