fix: build ứng dụng trên android và có thể đăng nhập bằng Google Oauth

This commit is contained in:
2026-06-27 10:39:22 +07:00
parent d8bbb22dbd
commit ee42bfcefa
47 changed files with 5149 additions and 124 deletions
+4 -1
View File
@@ -1,6 +1,7 @@
import React, { useState, useEffect } from 'react';
import { X, Send, MessageSquare, User, Loader2, Trash2 } from 'lucide-react';
import { io } from 'socket.io-client';
import { Capacitor } from '@capacitor/core';
import { useTourStore } from '@/store/useTourStore';
import { ConfirmModal } from './ConfirmModal';
@@ -69,7 +70,9 @@ export const CommentModal: React.FC<CommentModalProps> = ({ isOpen, onClose, loc
fetchComments();
// Lắng nghe bình luận mới qua Proxy (không cần hardcode URL)
const socket = io();
const socket = Capacitor.isNativePlatform()
? io(import.meta.env.VITE_BACKEND_URL || 'https://yotrip.labz.io.vn')
: io();
socket.emit('joinTour', 'global'); // Hoặc logic join cụ thể
socket.on('commentAdded', (newCommentData: any) => {