Skip to content

Commit 45438c0

Browse files
committed
Verify if current user has existing token before making a match request
1 parent b86aa0a commit 45438c0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

frontend/src/app/(auth)/match/page.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,15 @@ const FindPeer = () => {
226226
return;
227227
}
228228

229+
if (!CURRENT_USER) {
230+
Swal.fire(
231+
"Error",
232+
"What did you do... Why did you delete the cookie??",
233+
"error"
234+
);
235+
return;
236+
}
237+
229238
client.publish({
230239
destination: "/app/matchRequest",
231240
body: JSON.stringify(userMatchRequest),

0 commit comments

Comments
 (0)