• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CBIIT / crdc-datahub-ui / 18789341118

24 Oct 2025 06:57PM UTC coverage: 78.178% (+15.5%) from 62.703%
18789341118

push

github

web-flow
Merge pull request #888 from CBIIT/3.4.0

3.4.0 Release

4977 of 5488 branches covered (90.69%)

Branch coverage included in aggregate %.

8210 of 9264 new or added lines in 257 files covered. (88.62%)

6307 existing lines in 120 files now uncovered.

30203 of 39512 relevant lines covered (76.44%)

213.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/components/DataSubmissions/BackButton.tsx
UNCOV
1
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
×
UNCOV
2
import { Button, ButtonProps, styled } from "@mui/material";
×
NEW
3
import React, { FC } from "react";
×
NEW
4
import { useNavigate } from "react-router-dom";
×
5

6
const StyledBackButton = styled(Button)(() => ({
×
UNCOV
7
  color: "#2E5481",
×
UNCOV
8
  fontWeight: 700,
×
UNCOV
9
  fontSize: "14px",
×
UNCOV
10
  fontFamily: "'Nunito', 'Rubik', sans-serif",
×
UNCOV
11
  lineHeight: "19.6px",
×
UNCOV
12
  "&:hover": {
×
UNCOV
13
    background: "transparent",
×
UNCOV
14
  },
×
UNCOV
15
  "& svg": {
×
UNCOV
16
    marginRight: "4px",
×
UNCOV
17
  },
×
UNCOV
18
}));
×
19

20
type Props = {
21
  text?: string;
22
  navigateTo?: string;
23
} & ButtonProps;
24

25
const BackButton: FC<Props> = ({ text = "Back", navigateTo }) => {
×
26
  const navigate = useNavigate();
×
27

28
  const navigateToPath = () => {
×
29
    if (!navigateTo) {
×
30
      return;
×
UNCOV
31
    }
×
32

33
    navigate(navigateTo);
×
34
    window.scrollTo(0, 0);
×
UNCOV
35
  };
×
36

37
  return (
×
UNCOV
38
    <StyledBackButton
×
UNCOV
39
      variant="text"
×
UNCOV
40
      onClick={navigateToPath}
×
UNCOV
41
      startIcon={<ArrowBackIcon fontSize="small" />}
×
UNCOV
42
      disableElevation
×
UNCOV
43
      disableRipple
×
UNCOV
44
      disableFocusRipple
×
UNCOV
45
      disableTouchRipple
×
46
    >
UNCOV
47
      {text}
×
UNCOV
48
    </StyledBackButton>
×
49
  );
UNCOV
50
};
×
51

UNCOV
52
export default React.memo(BackButton);
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc