Skip to content

Commit

Permalink
fix:activity_detail check fail (#192)
Browse files Browse the repository at this point in the history
Co-authored-by: South Drifted <shiy2008@gmail.com>
  • Loading branch information
huoyueyuyuan and TechQuery committed Aug 25, 2023
1 parent 0853bb4 commit f554b90
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 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,19 @@ 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)}
/>
<Form.Control
className="d-none"
isInvalid={!this.detailHTML.trim() && this.validated}
hidden
name="detail"
required
defaultValue={this.detailHTML || detail}
/>
<Form.Control.Feedback type="invalid">
{textJoin(t('please_enter'), t('activity_detail'))}
Expand Down

1 comment on commit f554b90

@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-f78z3rnq2-techquery.vercel.app

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

Please sign in to comment.