Skip to content

Commit

Permalink
fix activity_detail check fail
Browse files Browse the repository at this point in the history
  • Loading branch information
huoyueyuyuan committed Aug 25, 2023
1 parent 0853bb4 commit 2732413
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions components/Activity/ActivityEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class ActivityEditor extends PureComponent<ActivityEditorProps> {

const form = event.currentTarget;

if (form.checkValidity() === false) return (this.validated = true);
if (!form.checkValidity()) return (this.validated = true);

const { name } = this.props,
data = formToJSON<ActivityFormData>(form);
Expand Down Expand Up @@ -271,18 +271,16 @@ export class ActivityEditor extends PureComponent<ActivityEditorProps> {

<Form.Group as={Row} className="mb-3" controlId="briefInfo">
<Form.Label column sm={2}>
{t('hackathon_detail')}
{t('activity_detail')}
<span className="text-danger"> *</span>
</Form.Label>
<Col sm={10}>
<HTMLEditor
name="detail"
defaultValue={detail}
onChange={code => (this.detailHTML = code)}
/>
<HTMLEditor onChange={code => (this.detailHTML = code)} />
<Form.Control
name="detail"
className="d-none"
isInvalid={!this.detailHTML.trim() && this.validated}
required
defaultValue={this.detailHTML}
/>
<Form.Control.Feedback type="invalid">
{textJoin(t('please_enter'), t('activity_detail'))}
Expand Down

1 comment on commit 2732413

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for open-hackathon ready!

✅ Preview
https://open-hackathon-n8v3okzsg-techquery.vercel.app

Built with commit 2732413.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.