From debf40a6e1e4080dd902c504724b724b18733b4a Mon Sep 17 00:00:00 2001 From: imomer Date: Sun, 12 Feb 2017 19:08:14 +0500 Subject: [PATCH 1/3] Enhancement added - Now copy Ayah feature includes Surah and Ayah number --- src/components/Ayah/index.js | 5 +++-- src/components/Copy/index.js | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/components/Ayah/index.js b/src/components/Ayah/index.js index 3b7aca6dd..82f4bba52 100644 --- a/src/components/Ayah/index.js +++ b/src/components/Ayah/index.js @@ -43,6 +43,7 @@ export default class Ayah extends Component { currentAyah: PropTypes.string }; + static defaultProps = { currentWord: null, isSearched: false @@ -198,11 +199,11 @@ export default class Ayah extends Component { } renderCopyLink() { - const { isSearched, ayah: { textTashkeel } } = this.props; + const { isSearched, ayah } = this.props; if (!isSearched) { return ( - + ); } diff --git a/src/components/Copy/index.js b/src/components/Copy/index.js index 02f5562c9..3998373a0 100644 --- a/src/components/Copy/index.js +++ b/src/components/Copy/index.js @@ -4,7 +4,9 @@ import LocaleFormattedMessage from 'components/LocaleFormattedMessage'; export default class Copy extends Component { static propTypes = { - text: PropTypes.string.isRequired + text: PropTypes.string.isRequired, + surah: PropTypes.string.isRequired, + ayah: PropTypes.string.isRequired } state = { @@ -12,7 +14,7 @@ export default class Copy extends Component { }; handleCopy = () => { - copyToClipboard(this.props.text); + copyToClipboard(`${this.props.text} - ${this.props.surah}:${this.props.ayah}`); this.setState({ isCopied: true }); setTimeout(() => this.setState({ isCopied: false }), 1000); @@ -36,4 +38,5 @@ export default class Copy extends Component { ); } + } From 010edba52099055df102f78dc6be4232db5f4817 Mon Sep 17 00:00:00 2001 From: imomer Date: Fri, 10 Mar 2017 18:50:24 +0500 Subject: [PATCH 2/3] Rebased :) --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 2c85a0ee9..9a0881a83 100644 --- a/.env +++ b/.env @@ -1,6 +1,6 @@ NODE_ENV=development PORT=8000 -API_URL=http://staging.quran.com:3000 +API_URL=http://quran.com ONE_QURAN_URL=http://localhost:3030 SEGMENTS_KEY= SENTRY_KEY_CLIENT= From 882cd060a201a0ce8f6a853668fe1915744ddb36 Mon Sep 17 00:00:00 2001 From: imomer Date: Fri, 10 Mar 2017 21:19:39 +0500 Subject: [PATCH 3/3] Stagin API Added --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 9a0881a83..2c85a0ee9 100644 --- a/.env +++ b/.env @@ -1,6 +1,6 @@ NODE_ENV=development PORT=8000 -API_URL=http://quran.com +API_URL=http://staging.quran.com:3000 ONE_QURAN_URL=http://localhost:3030 SEGMENTS_KEY= SENTRY_KEY_CLIENT=