Skip to content

Commit

Permalink
Code optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
ljl committed Jun 13, 2023
1 parent 6496cc0 commit e1d118e
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions client/app/pages/dashboards/components/ShareDashboardDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,15 @@ class ShareDashboardDialog extends React.Component {
</Form.Item>
)}

{this.enabled && (
<Form.Item label="Allow public access" {...this.formItemProps}>
<Switch
checked={dashboard.publicAccessEnabled}
onChange={this.onChange}
loading={this.state.saving}
disabled={!this.enabled}
data-test="PublicAccessEnabled"
/>
</Form.Item>
)}

<Form.Item label="Allow public access" {...this.formItemProps}>
<Switch
checked={dashboard.publicAccessEnabled}
onChange={this.onChange}
loading={this.state.saving}
disabled={!this.enabled}
data-test="PublicAccessEnabled"
/>
</Form.Item>
{dashboard.public_url && (
<>
<Form.Item>
Expand Down

0 comments on commit e1d118e

Please sign in to comment.