-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update url formats popular networks (#4644)
* update url format for popular network * update url feedback * update url in individual network screen
- Loading branch information
1 parent
738ef08
commit 87d7635
Showing
7 changed files
with
56 additions
and
11 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import hideKeyFromUrl from './hideKeyFromUrl'; | ||
|
||
describe('hideKeyFromUrl', () => { | ||
it('should hide key from url', () => { | ||
const urlString = 'https://www.example.com/v1/1234556'; | ||
const sanitizedUrl = hideKeyFromUrl(urlString); | ||
expect(sanitizedUrl).toEqual('https://www.example.com/v1'); | ||
}); | ||
|
||
it('should do nothing when url is undefined', () => { | ||
const urlString = undefined; | ||
const sanitizedUrl = hideKeyFromUrl(urlString); | ||
expect(sanitizedUrl).toEqual(undefined); | ||
}); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
const hideKeyFromUrl = (url: string | undefined) => | ||
url?.substring(0, url.lastIndexOf('/')); | ||
|
||
export default hideKeyFromUrl; |
This file was deleted.
Oops, something went wrong.