diff options
Diffstat (limited to 'src/core/utils')
| -rw-r--r-- | src/core/utils/whatsappUrl.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/utils/whatsappUrl.js b/src/core/utils/whatsappUrl.js index 6c354924..9a92f424 100644 --- a/src/core/utils/whatsappUrl.js +++ b/src/core/utils/whatsappUrl.js @@ -1,9 +1,10 @@ import { getAuth } from "./auth" -const whatsappUrl = (template = 'default', payload, urlPath = '') => { +const whatsappUrl = (template = 'default', payload, urlPath = null) => { let user = getAuth() if(!user){ - return `/login?next=${urlPath}` + if(urlPath) return `/login?next=${urlPath}` + if(!urlPath) return '/login' } let parentName = user.parentName || '-' let url = 'https://wa.me/628128080622' |
