diff options
author | Logan Hunt <loganhunt@simponic.xyz> | 2022-04-01 14:16:35 -0600 |
---|---|---|
committer | Logan Hunt <loganhunt@simponic.xyz> | 2022-04-01 14:16:35 -0600 |
commit | 1108970a6aeb98a2f113383c6437dd4d862dae10 (patch) | |
tree | 30c5d3f60746d92fe37a3a8dd8f0c4c4cc5e052d /client/components/home | |
parent | f62854ebaa689c4bf434f213f1f610a1779f8696 (diff) | |
download | locchat-1108970a6aeb98a2f113383c6437dd4d862dae10.tar.gz locchat-1108970a6aeb98a2f113383c6437dd4d862dae10.zip |
Updates
Diffstat (limited to 'client/components/home')
-rw-r--r-- | client/components/home/_home.jsx | 4 |
1 files changed, 2 insertions, 2 deletions
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}`); } }; |