Skip to content

Commit

Permalink
refactor: conditionally render chart animation link for published graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasrodes committed Jan 8, 2025
1 parent fed6039 commit 06db99d
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions adminSiteClient/EditorExportTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -367,21 +367,23 @@ export class EditorExportTab<
</Section>

{/* Link to Wizard dataset preview */}
<Section name="Export mobile static chart">
<a
href={chartAnimationUrl.toString()}
target="_blank"
className="btn btn-tertiary"
rel="noopener"
>
<Button
type="default"
icon={<FontAwesomeIcon icon={faHatWizard} />}
{this.grapher.isPublished && (
<Section name="Animate chart">
<a
href={chartAnimationUrl.toString()}
target="_blank"
className="btn btn-tertiary"
rel="noopener"
>
Animate with Wizard
</Button>
</a>
</Section>
<Button
type="default"
icon={<FontAwesomeIcon icon={faHatWizard} />}
>
Animate with Wizard
</Button>
</a>
</Section>
)}
</div>
)
}
Expand Down

0 comments on commit 06db99d

Please sign in to comment.