diff --git a/src/Routers.jsx b/src/Routers.jsx
index 57577ee..4c6842c 100644
--- a/src/Routers.jsx
+++ b/src/Routers.jsx
@@ -72,6 +72,7 @@ const PromoPage = lazy(()=> import("./views/PromoPage"));
const PromoRefer = lazy(() => import('./views/PromoRefer'))
const InviteRefer = lazy(() => import('./views/InviteRefer'))
+const MyRefer = lazy(() => import('./views/MyRefer'))
export default function Routers() {
return (
@@ -100,6 +101,7 @@ export default function Routers() {
} />
} />
} />
+ } />
>
) : (
<>
diff --git a/src/components/AuthPages/SignUp/index2.jsx b/src/components/AuthPages/SignUp/index2.jsx
index 952d590..ffb28ba 100644
--- a/src/components/AuthPages/SignUp/index2.jsx
+++ b/src/components/AuthPages/SignUp/index2.jsx
@@ -8,7 +8,13 @@ import AuthLayout from "../AuthLayout2";
import GoogleDownload from '../../../assets/images/download/andriod.jpg'
import IOSDownload from '../../../assets/images/download/apple.jpg'
-export default function SignUp({details}) {
+/* Note
+The Props in this component
+1. refer_link holds the value to be sent as the referral code
+2. details holds the value of the person either referred via invite or promo
+*/
+
+export default function SignUp({refer_link, details}) {
const location = useLocation();
// eslint-disable-next-line no-restricted-globals
@@ -104,6 +110,7 @@ export default function SignUp({details}) {
}
setSignUpLoading(true);
+ let referral_link = refer_link ? {refer_link} : {} // FOR USER COMING FROM REFERRAL PROCESS
const reqData = {
country: country,
firstname: first_name,
@@ -113,6 +120,7 @@ export default function SignUp({details}) {
password: password,
terms: 1,
news: 1,
+ ...referral_link
};
const res = await userApi.CreateUser(reqData);
diff --git a/src/views/MyRefer.jsx b/src/views/MyRefer.jsx
new file mode 100644
index 0000000..e41b162
--- /dev/null
+++ b/src/views/MyRefer.jsx
@@ -0,0 +1,17 @@
+import React, {useState, useEffect} from "react";
+import { useParams } from "react-router-dom";
+
+import SignUp from "../components/AuthPages/SignUp/index2";
+
+function MyRefer() {
+
+ const {refer_link} = useParams()
+
+ return (
+ <>
+
+ >
+ );
+}
+
+export default MyRefer;
\ No newline at end of file