diff --git a/CreateRoom.js b/CreateRoom.js new file mode 100644 index 0000000..6dc0843 --- /dev/null +++ b/CreateRoom.js @@ -0,0 +1,19 @@ +//Updated the CreateRoom.js file according to latest code +import React from "react"; +import { v1 as uuid } from "uuid"; +import { useNavigate } from "react-router-dom"; + +const CreateRoom = (props) => { + const navigate = useNavigate(); + + function create() { + const id = uuid(); + navigate(`/room/${id}`); + } + + return ( + + ); +} + +export default CreateRoom;