Skip to content

Commit

Permalink
fix: Publish Modal appearance, Publish Button props, add translation
Browse files Browse the repository at this point in the history
  • Loading branch information
ekraffmiller committed Oct 1, 2024
1 parent 6d1faab commit 6732194
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions public/locales/en/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"anonymous": "This collection currently has no datasets. Please <1>log in</1> to see if you are able to add to it."
},
"publish": {
"title": "Publish Collection",
"button": "Publish",
"question": "Are you sure you want to publish your collection? Once you do so it must remain published.",
"error": "There was an error publishing your collection."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,25 @@ export function PublishCollectionModal({
}

return (
<Modal show={show} onHide={handleClose} size="xl">
<Modal show={show} onHide={handleClose} size="lg">
<Modal.Header>
<Modal.Title>Publish Collection</Modal.Title>
<Modal.Title>{tCollection('title')}</Modal.Title>
</Modal.Header>
<Modal.Body>
<Stack direction="vertical">
<p className={styles.warningText}>{tCollection('publish.question')}</p>
<span className={styles.errorText}>
{submissionStatus === SubmissionStatus.Errored &&
`${tCollection('publish.error')} ${publishError ? publishError : ''}`}
</span>
{submissionStatus === SubmissionStatus.Errored && (
<p className={styles.errorText}>
`${tCollection('publish.error')} ${publishError ? publishError : ''}`
</p>
)}
</Stack>
</Modal.Body>
<Modal.Footer>
<Button
variant="primary"
onClick={() => {
submitPublish()
}}
disabled={submissionStatus === SubmissionStatus.IsSubmitting}
onClick={submitPublish}
type="submit">
{tShared('continue')}
</Button>
Expand Down

0 comments on commit 6732194

Please sign in to comment.