diff --git a/package-lock.json b/package-lock.json index 6f810530e..aef0e2ff2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@jeremyckahn/farmhand", - "version": "1.18.4", + "version": "1.18.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@jeremyckahn/farmhand", - "version": "1.18.4", + "version": "1.18.5", "license": "GPL-2.0-or-later", "dependencies": { "@fortawesome/fontawesome-svg-core": "^1.2.27", @@ -45,6 +45,7 @@ "react-confetti": "^6.1.0", "react-dom": "^17.0.2", "react-file-reader-input": "^2.0.0", + "react-helmet": "^6.1.0", "react-hotkeys": "^2.0.0", "react-markdown": "^4.3.1", "react-number-format": "^4.4.1", @@ -26995,6 +26996,11 @@ "dev": true, "license": "MIT" }, + "node_modules/react-fast-compare": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz", + "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==" + }, "node_modules/react-file-reader-input": { "version": "2.0.0", "license": "MIT", @@ -27003,6 +27009,20 @@ "react-dom": "^15.0.0 || ^16.0.0" } }, + "node_modules/react-helmet": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/react-helmet/-/react-helmet-6.1.0.tgz", + "integrity": "sha512-4uMzEY9nlDlgxr61NL3XbKRy1hEkXmKNXhjbAIOVw5vcFrsdYbH2FEwcNyWvWinl103nXgzYNlns9ca+8kFiWw==", + "dependencies": { + "object-assign": "^4.1.1", + "prop-types": "^15.7.2", + "react-fast-compare": "^3.1.1", + "react-side-effect": "^2.1.0" + }, + "peerDependencies": { + "react": ">=16.3.0" + } + }, "node_modules/react-hotkeys": { "version": "2.0.0", "license": "ISC", @@ -27537,6 +27557,14 @@ "node": ">= 10.0.0" } }, + "node_modules/react-side-effect": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-2.1.2.tgz", + "integrity": "sha512-PVjOcvVOyIILrYoyGEpDN3vmYNLdy1CajSFNt4TDsVQC5KpTijDvWVoR+/7Rz2xT978D8/ZtFceXxzsPwZEDvw==", + "peerDependencies": { + "react": "^16.3.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/react-test-renderer": { "version": "16.14.0", "dev": true, @@ -51959,9 +51987,25 @@ "version": "6.0.11", "dev": true }, + "react-fast-compare": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz", + "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==" + }, "react-file-reader-input": { "version": "2.0.0" }, + "react-helmet": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/react-helmet/-/react-helmet-6.1.0.tgz", + "integrity": "sha512-4uMzEY9nlDlgxr61NL3XbKRy1hEkXmKNXhjbAIOVw5vcFrsdYbH2FEwcNyWvWinl103nXgzYNlns9ca+8kFiWw==", + "requires": { + "object-assign": "^4.1.1", + "prop-types": "^15.7.2", + "react-fast-compare": "^3.1.1", + "react-side-effect": "^2.1.0" + } + }, "react-hotkeys": { "version": "2.0.0", "requires": { @@ -52305,6 +52349,11 @@ } } }, + "react-side-effect": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-2.1.2.tgz", + "integrity": "sha512-PVjOcvVOyIILrYoyGEpDN3vmYNLdy1CajSFNt4TDsVQC5KpTijDvWVoR+/7Rz2xT978D8/ZtFceXxzsPwZEDvw==" + }, "react-test-renderer": { "version": "16.14.0", "dev": true, diff --git a/package.json b/package.json index ddc6cfb9e..f9312a3f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@jeremyckahn/farmhand", - "version": "1.18.4", + "version": "1.18.5", "publishConfig": { "access": "public" }, @@ -121,6 +121,7 @@ "react-confetti": "^6.1.0", "react-dom": "^17.0.2", "react-file-reader-input": "^2.0.0", + "react-helmet": "^6.1.0", "react-hotkeys": "^2.0.0", "react-markdown": "^4.3.1", "react-number-format": "^4.4.1", diff --git a/src/components/ChatRoom/ChatRoom.js b/src/components/ChatRoom/ChatRoom.js new file mode 100644 index 000000000..c948ddcf2 --- /dev/null +++ b/src/components/ChatRoom/ChatRoom.js @@ -0,0 +1,76 @@ +import React, { useContext } from 'react' +import { Helmet } from 'react-helmet' +import classNames from 'classnames' +import Button from '@material-ui/core/Button' +import Dialog from '@material-ui/core/Dialog' +import DialogTitle from '@material-ui/core/DialogTitle' +import DialogContent from '@material-ui/core/DialogContent' +import DialogActions from '@material-ui/core/DialogActions' +import Typography from '@material-ui/core/Typography' + +import FarmhandContext from '../Farmhand/Farmhand.context' + +import './ChatRoom.sass' + +const chitchatterDomain = 'https://chitchatter.im' + +export const ChatRoom = () => { + const dialogTitleId = 'chat-title' + const dialogContentId = 'chat-content' + + const { + handlers: { handleChatRoomOpenStateChange }, + gameState: { id, isChatOpen, room }, + } = useContext(FarmhandContext) + + const handleChatRoomClose = () => { + handleChatRoomOpenStateChange(false) + } + + const chatRoomComponent = ( + // @ts-ignore + + ) + + return ( + <> + +