summaryrefslogtreecommitdiff
path: root/client/components/home/_home.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/home/_home.jsx')
-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}`);
}
};