diff options
author | Logan Hunt <loganhunt@simponic.xyz> | 2022-04-01 16:04:00 -0600 |
---|---|---|
committer | Logan Hunt <loganhunt@simponic.xyz> | 2022-04-01 16:04:00 -0600 |
commit | dbb9eea25f80e7984a112409863be5191af5bf5e (patch) | |
tree | cca24e23afc5e7bb4b92a0582aaec48f6a08af72 /client/components/map | |
parent | 1108970a6aeb98a2f113383c6437dd4d862dae10 (diff) | |
download | locchat-dbb9eea25f80e7984a112409863be5191af5bf5e.tar.gz locchat-dbb9eea25f80e7984a112409863be5191af5bf5e.zip |
Added way too much stuff
Diffstat (limited to 'client/components/map')
-rw-r--r-- | client/components/map/chat_room_geoman.jsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/client/components/map/chat_room_geoman.jsx b/client/components/map/chat_room_geoman.jsx index a39b45a..07d0a4c 100644 --- a/client/components/map/chat_room_geoman.jsx +++ b/client/components/map/chat_room_geoman.jsx @@ -2,6 +2,7 @@ import { useLeafletContext } from '@react-leaflet/core'; import L from 'leaflet'; import markerIconPng from 'leaflet/dist/images/marker-icon.png'; import { useEffect, useContext, useState } from 'react'; +import toast from 'react-hot-toast'; import { ApiContext } from '../../utils/api_context'; const userPositionBubble = { @@ -162,7 +163,12 @@ export const Geoman = ({ user, userPos, joinRoom }) => { longitude, radius: shape.layer.getRadius(), }); - console.log(chatRoom); + if (chatRoom.error) { + toast.error(chatRoom.error); + } else if (chatRoom.id) { + toast.success('Chat room created'); + } + reRender(); } }); |