summaryrefslogtreecommitdiff
path: root/client/components/home/_home.jsx
diff options
context:
space:
mode:
authorLogan Hunt <loganhunt@simponic.xyz>2022-04-01 16:04:00 -0600
committerLogan Hunt <loganhunt@simponic.xyz>2022-04-01 16:04:00 -0600
commitdbb9eea25f80e7984a112409863be5191af5bf5e (patch)
treecca24e23afc5e7bb4b92a0582aaec48f6a08af72 /client/components/home/_home.jsx
parent1108970a6aeb98a2f113383c6437dd4d862dae10 (diff)
downloadlocchat-dbb9eea25f80e7984a112409863be5191af5bf5e.tar.gz
locchat-dbb9eea25f80e7984a112409863be5191af5bf5e.zip
Added way too much stuff
Diffstat (limited to 'client/components/home/_home.jsx')
-rw-r--r--client/components/home/_home.jsx3
1 files changed, 3 insertions, 0 deletions
diff --git a/client/components/home/_home.jsx b/client/components/home/_home.jsx
index a31fd63..f275d3d 100644
--- a/client/components/home/_home.jsx
+++ b/client/components/home/_home.jsx
@@ -1,4 +1,5 @@
import { useContext, useEffect, useState } from 'react';
+import toast from 'react-hot-toast';
import { useNavigate } from 'react-router';
import { ApiContext } from '../../utils/api_context';
import { AuthContext } from '../../utils/auth_context';
@@ -31,6 +32,8 @@ export const Home = () => {
const joinable = await api.get(`/chat_rooms/${id}/joinable?lat=${userPosition.lat}&lng=${userPosition.lng}`);
if (joinable) {
navigate(`/rooms/${id}`);
+ } else {
+ toast.error('Room is not joinable');
}
};