From 1108970a6aeb98a2f113383c6437dd4d862dae10 Mon Sep 17 00:00:00 2001 From: Logan Hunt Date: Fri, 1 Apr 2022 14:16:35 -0600 Subject: Updates --- client/components/home/_home.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client/components/home') diff --git a/client/components/home/_home.jsx b/client/components/home/_home.jsx index 213d43e..a31fd63 100644 --- a/client/components/home/_home.jsx +++ b/client/components/home/_home.jsx @@ -28,8 +28,8 @@ export const Home = () => { }; const joinRoom = async (id, userPosition) => { - const res = await api.get(`/chat_rooms/${id}/joinable?lat=${userPosition.lat}&lng=${userPosition.lng}`); - if (res) { + const joinable = await api.get(`/chat_rooms/${id}/joinable?lat=${userPosition.lat}&lng=${userPosition.lng}`); + if (joinable) { navigate(`/rooms/${id}`); } }; -- cgit v1.2.3-70-g09d2