Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #395 from SELab-2/bug_fix_deadline
Browse files Browse the repository at this point in the history
Bug fix deadline
  • Loading branch information
ALBERICLOOS authored May 23, 2024
2 parents 0a02e92 + b8219d7 commit 761099e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/src/components/ProjectTeacherComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ export function ProjectTeacherComponent(props: {
updateTitle?: (name: string) => void,
is_new?: boolean,
}): JSX.Element {
const course_options = props.project.all_courses.filter(course => !course.course_archived).map(course => course.course_name);

const navigate = useNavigate();
const {t} = useTranslation();
const [projectName, setProjectName] = useState<string>(props.project.projectName)
const [courseName, setCourseName] = useState<string>(props.project.courseName)
const [courseName, setCourseName] = useState<string>(course_options[0])
const [hours, setHours] = useState<number>(props.project.hours);
const [minutes, setMinutes] = useState<number>(props.project.minutes);
const [deadline, setDeadline] = useState<string>(props.project.deadline);
Expand Down Expand Up @@ -95,7 +97,6 @@ export function ProjectTeacherComponent(props: {
}
};

const course_options = props.project.all_courses.filter(course => !course.course_archived).map(course => course.course_name);

const hours_array = Array.from({length: 24}, (_, index) => index.toString());
const minutes_array = Array.from({length: 60}, (_, index) => index.toString());
Expand Down

0 comments on commit 761099e

Please sign in to comment.