Skip to content

Commit

Permalink
fix: use green colour for mark panel when awarded mark is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
procaconsul committed Sep 5, 2024
1 parent ea781ef commit 60a66fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/MarkingPage/MarkInputPanel/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Badge, Box, Button, Card, Flex, Grid, Separator, Text, TextField } from '@radix-ui/themes'
import { plainToInstance } from 'class-transformer'
import { formatDistanceToNow } from 'date-fns'
import { isEmpty, orderBy } from 'lodash'
import { isEmpty, isNil, orderBy } from 'lodash'
import React, { FC, useState } from 'react'

import CardBody from '../../../components/Card/CardBody'
Expand Down Expand Up @@ -41,7 +41,7 @@ const MarkInputPanel: FC<MarkInputPanelProps> = ({
feedback: '',
}
const markHistory = orderBy(currentMark?.history, 'timestamp', 'desc') ?? []
const colour = currentMark?.mark ? 'green' : 'red'
const colour = !isNil(currentMark?.mark) ? 'green' : 'red'
const [newMark, setNewMark] = useState(initMark)

function handleChange(key: keyof MarkRoot, value: any) {
Expand Down

0 comments on commit 60a66fe

Please sign in to comment.