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

CaptainFact / captain-fact-frontend / 13509561802

24 Feb 2025 10:56PM UTC coverage: 5.504% (-1.4%) from 6.953%
13509561802

push

github

web-flow
Release (#1375)

* chore(deps-dev): Bump @babel/preset-env from 7.20.2 to 7.26.9 (#1371)

Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.20.2 to 7.26.9.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.26.9/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Misc styles & GraphQL fixes (#1374)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

43 of 1647 branches covered (2.61%)

Branch coverage included in aggregate %.

192 of 2623 relevant lines covered (7.32%)

0.17 hits per line

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

0.0
/app/components/Moderation/ModerationForm.jsx
1
import { ShieldBan, ShieldCheck, ShieldQuestion } from 'lucide-react'
2
import React from 'react'
3
import { withTranslation } from 'react-i18next'
4
import { connect } from 'react-redux'
5
import { formValueSelector, reduxForm } from 'redux-form'
6

7
import {
8
  MODERATION_ACTION_ABUSIVE,
9
  MODERATION_ACTION_CONFIRM,
10
  MODERATION_ACTION_NOTSURE,
11
} from '../../constants'
12
import { Button } from '../ui/button'
13
import FlagReasonSelect from './FlagReasonSelect'
14

15
const FORM_NAME = 'moderationForm'
×
16

17
const valueSelector = formValueSelector(FORM_NAME)
×
18

19
@withTranslation('moderation')
20
@reduxForm({ form: FORM_NAME })
21
@connect((state) => ({ flagReason: valueSelector(state, 'reason') }))
×
22
export class ModerationForm extends React.PureComponent {
23
  render() {
24
    const { t, flagReason } = this.props
×
25
    return (
×
26
      <div>
27
        <h4 className="text-lg font-medium mb-4">{t('whyReport')}</h4>
28
        <FlagReasonSelect />
29
        <div className="flex gap-2 mt-6 flex-wrap">
30
          <Button
31
            className="flex-1"
32
            variant="outline"
33
            disabled={!flagReason}
34
            onClick={this.getSubmit(MODERATION_ACTION_ABUSIVE)}
35
          >
36
            <ShieldBan size={16} />
37
            {t('actions.flag_abusive')}
38
          </Button>
39
          <Button
40
            className="flex-1"
41
            variant="outline"
42
            disabled={!flagReason}
43
            onClick={this.getSubmit(MODERATION_ACTION_NOTSURE)}
44
          >
45
            <ShieldQuestion size={16} />
46
            {t('actions.unsure')}
47
          </Button>
48
          <Button
49
            className="flex-1"
50
            variant="outline"
51
            disabled={!flagReason}
52
            onClick={this.getSubmit(MODERATION_ACTION_CONFIRM)}
53
          >
54
            <ShieldCheck size={16} />
55
            {t('actions.confirm')}
56
          </Button>
57
        </div>
58
      </div>
59
    )
60
  }
61

62
  getSubmit(value) {
63
    return this.props.handleSubmit(({ action_id, reason }) => {
×
64
      this.props.onSubmit({ action_id, reason: parseInt(reason), value })
×
65
    })
66
  }
67
}
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