Coursemology/coursemology2

View on GitHub
client/app/bundles/course/assessment/submission/pages/SubmissionEditIndex/TimeLimitBanner.tsx

Summary

Maintainability
A
3 hrs
Test Coverage

Function TimeLimitBanner has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const TimeLimitBanner: FC<Props> = (props) => {
  const { submissionTimeLimitAt } = props;
  const initialCurrentTime = new Date().getTime();
  const initialRemainingTime = submissionTimeLimitAt - initialCurrentTime;

Function remainingTimeDisplay has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const remainingTimeDisplay = (remainingTime: number): JSX.Element => {
  const hours = Math.floor(remainingTime / 1000 / 60 / 60) % 24;
  const minutes = Math.floor(remainingTime / 1000 / 60) % 60;
  const seconds = Math.floor(remainingTime / 1000) % 60;

There are no issues that match your filters.

Category
Status