Showing 1,205 of 1,252 total issues
Function updatePostOnServer
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function updatePostOnServer(postId) {
return (dispatch, getState) => {
const state = getState();
const post = state.discussion.posts.get(postId);
const text = post.editedContent;
- Create a ticketCreate a ticket
Function render
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { includePhantoms, answers, anonymous } = this.props;
const filteredAnswers = includePhantoms
? answers
: answers.filter((answer) => !answer.phantom);
- Create a ticketCreate a ticket
Function render
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<>
<Button
onClick={() => this.setState({ open: true })}
- Create a ticketCreate a ticket
Function RenderImageField
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const RenderImageField = (props) => {
const { field, index, disabled } = props;
const fieldId = `option-${index}-image-field`;
const inputRef = useRef(null);
return (
- Create a ticketCreate a ticket
Function mapButtonObjectToElement
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function mapButtonObjectToElement(button, isLast) {
if (button.icon) {
return (
<Tooltip key={`tooltip_${button.label.props.id}`} title={button.label}>
<IconButton
- Create a ticketCreate a ticket
Function renderComments
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderComments = () => {
const { answerId, fileId, expanded } = props;
if (expanded[lineNumber - 1]) {
return (
- Create a ticketCreate a ticket
Function renderTextResponseComprehensionGroup
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function renderTextResponseComprehensionGroup(group) {
return (
<>
<br />
<Typography variant="h6">
- Create a ticketCreate a ticket
Function renderTabs
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
renderTabs(myStudentsExist) {
return (
<Tabs
className="border-only-y-neutral-200"
onChange={(_, value) => this.setState({ tab: value })}
- Create a ticketCreate a ticket
Function MuiTableHeader
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
{props.headers.map((header, index) => {
const headerProps = props.forEach(header, index);
return (
<TableCell
- Create a ticketCreate a ticket
Function ExperiencePointsTable
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ExperiencePointsTable: FC<Props> = (props) => {
const { isStudentPage, isLoading, disabled, records } = props;
const { t } = useTranslation();
- Create a ticketCreate a ticket
Function SidebarAccordion
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SidebarAccordion = (props: SidebarAccordionProps): JSX.Element => {
const { containing: items, title } = props;
return (
<Accordion
- Create a ticketCreate a ticket
Function UserShow
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const UserShow: FC<Props> = () => {
const [isLoading, setIsLoading] = useState(true);
const dispatch = useAppDispatch();
const { userId } = useParams();
const user = useAppSelector((state) => getUserEntity(state, +userId!));
- Create a ticketCreate a ticket
Function DuplicatesAlert
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DuplicatesAlert = (props: DuplicatesAlertProps): JSX.Element | null => {
const { of: duplicates } = props;
const { t } = useTranslation();
- Create a ticketCreate a ticket
Function handleDelete
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const handleDelete = (): Promise<void> => {
setIsCreating(false);
if (item.new) {
return new Promise<void>(() => {});
}
- Create a ticketCreate a ticket
Function WatchVideoButton
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const WatchVideoButton: FC<Props> = (props) => {
const { video, intl } = props;
const { courseId } = useParams();
- Create a ticketCreate a ticket
Function AdminNavigator
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const AdminNavigator = (): JSX.Element => {
const { t } = useTranslation();
return (
<AdminNavigablePage
- Create a ticketCreate a ticket
Function SignUpLandingPage
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SignUpLandingPage = (): JSX.Element | null => {
const { t } = useTranslation();
const email = useEmailFromLocationState();
if (!email) return <Navigate to="/users/sign_up" />;
- Create a ticketCreate a ticket
Function updateResponse
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function updateResponse(
responseId,
payload,
successMessage,
failureMessage,
- Create a ticketCreate a ticket
Function publish
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function publish(submissionId, grades, exp) {
const payload = {
submission: {
answers: grades,
draft_points_awarded: exp,
- Create a ticketCreate a ticket
Function renderPublishToggle
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderPublishToggle = (survey) => {
const { dispatch } = props;
if (!survey.canUpdate) {
return null;
}
- Create a ticketCreate a ticket