summaryrefslogtreecommitdiff
path: root/src/core/utils
diff options
context:
space:
mode:
authortrisusilo <tri.susilo@altama.co.id>2023-09-05 03:09:22 +0000
committertrisusilo <tri.susilo@altama.co.id>2023-09-05 03:09:22 +0000
commita6f1daf3d6cbb6187628b13dfc0c31996c151727 (patch)
tree7687a64c17357895709f015f07f97e691ebdca92 /src/core/utils
parent6b1083de2c5ad57953c6653d00a42b2da3fea108 (diff)
parent009aab3dfc5a08f19c8e147f380dc6517b9f6fd1 (diff)
Merged in CR/tampilan (pull request #58)
CR/tampilan
Diffstat (limited to 'src/core/utils')
-rw-r--r--src/core/utils/auth.js2
-rw-r--r--src/core/utils/whatsappUrl.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/core/utils/auth.js b/src/core/utils/auth.js
index a7244747..03b20ae2 100644
--- a/src/core/utils/auth.js
+++ b/src/core/utils/auth.js
@@ -29,7 +29,7 @@ const setAuth = (user) => {
* @returns {boolean} - Returns `true`.
*/
const deleteAuth = async() => {
- // await signOut()
+ await signOut()
deleteCookie('auth')
return true
}
diff --git a/src/core/utils/whatsappUrl.js b/src/core/utils/whatsappUrl.js
index c5959ed6..6c354924 100644
--- a/src/core/utils/whatsappUrl.js
+++ b/src/core/utils/whatsappUrl.js
@@ -1,9 +1,9 @@
import { getAuth } from "./auth"
-const whatsappUrl = (template = 'default', payload) => {
+const whatsappUrl = (template = 'default', payload, urlPath = '') => {
let user = getAuth()
if(!user){
- return '/login'
+ return `/login?next=${urlPath}`
}
let parentName = user.parentName || '-'
let url = 'https://wa.me/628128080622'