Skip to content

Commit edfc237

Browse files
committed
fix: remove old script and address socket io reconnect isue
1 parent 4b2997c commit edfc237

3 files changed

Lines changed: 3 additions & 71 deletions

File tree

‎package-lock.json‎

Lines changed: 0 additions & 65 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
"test:e2e:report": "playwright show-report",
2121
"email:dev": "email dev"
2222
},
23-
"lint-staged": {
24-
"*": "prettier --write --ignore-unknown"
25-
},
2623
"dependencies": {
2724
"@netlify/functions": "^6.0.1",
2825
"@phosphor-icons/react": "^2.1.10",
@@ -68,7 +65,6 @@
6865
"eslint-config-next": "16.3.8",
6966
"eslint-config-prettier": "^10.1.8",
7067
"husky": "^9.1.7",
71-
"lint-staged": "^17.6.0",
7268
"prettier": "^3.9.9",
7369
"tailwindcss": "^4.3.3",
7470
"tsx": "^4.23.15",

‎src/app/rides/[id]/page.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,9 +469,10 @@ export default function RideDetailPage({
469469
setChatError("Connection issue — retrying…");
470470
});
471471

472-
newSocket.on("reconnect", () => setChatError(null));
472+
// Reconnection events come from the Socket.IO Manager (.io), not the socket.
473+
newSocket.io.on("reconnect", () => setChatError(null));
473474

474-
newSocket.on("reconnect_failed", () => {
475+
newSocket.io.on("reconnect_failed", () => {
475476
setChatError("Could not connect to chat. Please refresh the page.");
476477
socketRef.current = null;
477478
setSocket(null);

0 commit comments

Comments
 (0)