Skip to content
Snippets Groups Projects
Unverified Commit ed8a8242 authored by Anton Kulyk's avatar Anton Kulyk Committed by GitHub
Browse files

Update copy for SavedQuestionIntoModal for models (#19801)

parent 87cca1bd
No related branches found
No related tags found
No related merge requests found
......@@ -7,20 +7,25 @@ import { t } from "ttag";
export default class SavedQuestionIntroModal extends Component {
render() {
const { question, isShowingNewbModal, onClose } = this.props;
const isModel = question.isDataset();
const title = isModel
? t`It's okay to play around with models`
: t`It's okay to play around with saved questions`;
const message = isModel
? t`You won't make any permanent changes to them unless you edit their query definition.`
: t`You won't make any permanent changes to a saved question unless you click Save and choose to replace the original question.`;
return (
<Modal isOpen={this.props.isShowingNewbModal}>
<ModalContent
title={t`It's okay to play around with saved questions`}
className="Modal-content text-centered py2"
>
<div className="px2 pb2 text-paragraph">
{t`You won't make any permanent changes to a saved question unless you click Save and choose to replace the original question.`}
</div>
<Modal isOpen={isShowingNewbModal}>
<ModalContent title={title} className="Modal-content text-centered py2">
<div className="px2 pb2 text-paragraph">{message}</div>
<div className="Form-actions flex justify-center py1">
<button
data-metabase-event={"QueryBuilder;IntroModal"}
className="Button Button--primary"
onClick={() => this.props.onClose()}
onClick={onClose}
>
{t`Okay`}
</button>
......
......@@ -299,6 +299,7 @@ export default class View extends React.Component {
{isShowingNewbModal && (
<SavedQuestionIntroModal
question={this.props.question}
onClose={() => this.props.closeQbNewbModal()}
/>
)}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment