feat: add path to socket connection

This commit is contained in:
Ahmed Bouhuolia
2024-02-24 00:43:43 +02:00
parent 2d3544fe37
commit 7239b0ec7e
2 changed files with 3 additions and 3 deletions

View File

@@ -10,8 +10,8 @@ export function DashboardSockets() {
const client = useQueryClient();
useEffect(() => {
socket.current = io('ws://localhost:4000');
socket.current = io('/', { path: '/socket' });
socket.current.on('NEW_TRANSACTIONS_DATA', () => {
client.invalidateQueries(t.ACCOUNTS);
client.invalidateQueries(t.ACCOUNT_TRANSACTION);