This repository has been archived by the owner on Jun 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 362
Issue #471: better handling of sura/ayah urls #475
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Deployed to: http://staging.quran.com:32852 |
Deployed to: http://staging.quran.com:32853 |
Deployed to: http://staging.quran.com:32854 |
Quick thought: for handling redirection, you could replace these lines (https://github.com/quran/quran.com-frontend/blob/master/src/routes.js#L27-L31) with built-in |
Thanks, will do! |
Deployed to: http://staging.quran.com:32855 |
LGTM |
@atalebagha Thank you bro! |
@@ -4,4 +4,16 @@ export default function isValidSurah(nextState, replaceState) { | |||
if (isNaN(surahId) || surahId > 114 || surahId < 1) { | |||
replaceState('/error/invalid-surah'); | |||
} | |||
|
|||
if (nextState.params.range) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would love for this to be unit tested, inshallah in the future.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issue
#471
Changelog
/39:4
are rerouted to/39/4
/39/5-4
fixed to/39/4-5
/39:5-5
fixes to/39/5