x
This commit is contained in:
1 parent
6cfe39b1ff
commit
c1c3a43d7d
8 files changed
+21
-6
No files matched your search
@@ -13,8 +13,7 @@ export const initLiff = async (liffId: string) => {
|
||||
await authenticateWithBackend(profile);
|
||||
} else if (liff.isInClient()) {
|
||||
// เปิดเว็บผ่านเบราว์เซอร์ของ LINE (In-App Browser) แต่ยังไม่ได้ล็อกอิน
|
||||
// ส่ง redirectUri: window.location.href เพื่อให้หลัง login แล้วกลับมาที่หน้าเดิม
|
||||
liff.login({ redirectUri: window.location.href });
|
||||
liff.login();
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("LIFF Initialization failed", error);
|
||||
@@ -50,8 +49,7 @@ const authenticateWithBackend = async (profile: any) => {
|
||||
|
||||
export const loginLiff = () => {
|
||||
if (!liff.isLoggedIn()) {
|
||||
// ส่ง redirectUri เพื่อกลับมาที่หน้าเดิมหลัง login
|
||||
liff.login({ redirectUri: window.location.href });
|
||||
liff.login();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
"contact": "Contact",
|
||||
"shopNow": "Shop Now",
|
||||
"findMyScent": "Find My Scent ✨",
|
||||
"promotions": "Promotions",
|
||||
"profile": "My Profile",
|
||||
"search": {
|
||||
"title": "Search Collection",
|
||||
"placeholder": "Search scents, categories...",
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
"contact": "ติดต่อเรา",
|
||||
"shopNow": "ช้อปเลย",
|
||||
"findMyScent": "ค้นหากลิ่นของคุณ ✨",
|
||||
"promotions": "โปรโมชั่น",
|
||||
"profile": "โปรไฟล์ของฉัน",
|
||||
"search": {
|
||||
"title": "ค้นหาสินค้า",
|
||||
"placeholder": "ค้นหากลิ่น, คอลเลกชัน...",
|
||||
|
||||
Reference in new issue
Block a user