-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from behnaz-deriv/test
behnaz/referrer affiliate token
- Loading branch information
Showing
5 changed files
with
22 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,7 @@ Moreover, having these extensions will help you to speed up the development proc | |
2. **Clone using SSH** | ||
|
||
```sh | ||
git clone [email protected]:your-github-username/deriv-com.git | ||
git clone [email protected]:your-github-username/signup-deriv-com.git | ||
``` | ||
|
||
3. **Enter project directory** | ||
|
12 changes: 12 additions & 0 deletions
12
themes/gatsby-theme-deriv/src/common/url-affiliate-token.ts
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,12 @@ | ||
|
||
import { isBrowser } from './utility' | ||
export const affiliateTokenURL = () => { | ||
if (!isBrowser()) return; | ||
const urlObject = new URL(window.location.href); | ||
const params = new URLSearchParams(urlObject.search); | ||
const token = params.get("t"); | ||
if (params.has("referrer") && token != null) | ||
return token | ||
} | ||
|
||
|
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