Improvements on start button
This commit is contained in:
@@ -24,7 +24,7 @@ import {
|
||||
BsPen,
|
||||
} from "react-icons/bs";
|
||||
import { toast } from "react-toastify";
|
||||
import { activeAssignmentFilter } from "@/utils/assignments";
|
||||
import { futureAssignmentFilter } from "@/utils/assignments";
|
||||
|
||||
interface Props {
|
||||
isOpen: boolean;
|
||||
@@ -296,11 +296,9 @@ export default function AssignmentView({ isOpen, assignment, onClose }: Props) {
|
||||
|
||||
const shouldRenderStart = () => {
|
||||
if (assignment) {
|
||||
if (activeAssignmentFilter(assignment)) {
|
||||
return false;
|
||||
if (futureAssignmentFilter(assignment)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return assignment.results.length === 0;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user