summaryrefslogtreecommitdiff
path: root/client/components/home
diff options
context:
space:
mode:
authorLogan Hunt <loganhunt@simponic.xyz>2022-04-01 14:16:35 -0600
committerLogan Hunt <loganhunt@simponic.xyz>2022-04-01 14:16:35 -0600
commit1108970a6aeb98a2f113383c6437dd4d862dae10 (patch)
tree30c5d3f60746d92fe37a3a8dd8f0c4c4cc5e052d /client/components/home
parentf62854ebaa689c4bf434f213f1f610a1779f8696 (diff)
downloadlocchat-1108970a6aeb98a2f113383c6437dd4d862dae10.tar.gz
locchat-1108970a6aeb98a2f113383c6437dd4d862dae10.zip
Updates
Diffstat (limited to 'client/components/home')
-rw-r--r--client/components/home/_home.jsx4
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}`);
}
};