fix: khách mời join vào tour thông qua link mời

This commit is contained in:
2026-06-21 07:11:26 +07:00
parent 36157bd53b
commit 55fba75fda
5 changed files with 39 additions and 21 deletions
+2
View File
@@ -59,6 +59,8 @@ export const JoinTourPage: React.FC<JoinTourPageProps> = ({ onLoginSuccess, onGo
setSuccessMsg(data.message || 'Bạn đã tham gia tour thành công!');
setTourId(data.tourId);
// Đợi 500ms để đảm bảo các thay đổi cache ở backend hoàn tất trước khi tiếp tục
await new Promise((resolve) => setTimeout(resolve, 500));
localStorage.removeItem('pendingInviteToken');
} catch (err: any) {
setError(err.message || 'Đã xảy ra lỗi.');