From 4b8d5219a2320e6d3d1e1260574bd6042c97b27e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 1 Nov 2022 20:28:30 +0300 Subject: Add page titles --- vnext/package-lock.json | 52 ++++++++++++++++++++++++++++++++++++++++++++++-- vnext/package.json | 1 + vnext/src/ui/Chat.js | 4 ++++ vnext/src/ui/Contacts.js | 4 ++++ vnext/src/ui/Feeds.js | 37 +++++++++++++++++++++++++++++----- vnext/src/ui/Post.js | 4 ++++ vnext/src/ui/Settings.js | 4 ++++ vnext/src/ui/Thread.js | 5 +++++ vnext/src/ui/Users.js | 19 ++++++++++++++++-- 9 files changed, 121 insertions(+), 9 deletions(-) (limited to 'vnext') diff --git a/vnext/package-lock.json b/vnext/package-lock.json index e32c2794..836066b5 100644 --- a/vnext/package-lock.json +++ b/vnext/package-lock.json @@ -28,6 +28,7 @@ "react-content-loader": "^6.2.0", "react-cookie": "^4.1.1", "react-dom": "18.2.0", + "react-helmet": "^6.1.0", "react-hook-form": "^7.38.0", "react-hot-toast": "^2.4.0", "react-router-dom": "^6.4.2", @@ -14547,7 +14548,6 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -14961,6 +14961,25 @@ "integrity": "sha512-nQTTcUu+ATDbrSD1BZHr5kgSD4oF8OFjxun8uAaL8RwPBacGBNPf/yAuVVdx17N8XNzRDMrZ9XcKZHCjPW+9ew==", "dev": true }, + "node_modules/react-fast-compare": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.0.tgz", + "integrity": "sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==" + }, + "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-hook-form": { "version": "7.38.0", "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.38.0.tgz", @@ -15039,6 +15058,14 @@ "react": "^16.0.0 || ^17.0.0 || ^18.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": "18.2.0", "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-18.2.0.tgz", @@ -28291,7 +28318,6 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, "requires": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -28588,6 +28614,22 @@ "integrity": "sha512-nQTTcUu+ATDbrSD1BZHr5kgSD4oF8OFjxun8uAaL8RwPBacGBNPf/yAuVVdx17N8XNzRDMrZ9XcKZHCjPW+9ew==", "dev": true }, + "react-fast-compare": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.0.tgz", + "integrity": "sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==" + }, + "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-hook-form": { "version": "7.38.0", "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.38.0.tgz", @@ -28634,6 +28676,12 @@ "react-is": "^16.12.0 || ^17.0.0 || ^18.0.0" } }, + "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==", + "requires": {} + }, "react-test-renderer": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-18.2.0.tgz", diff --git a/vnext/package.json b/vnext/package.json index 931a219e..d8b7bdc8 100644 --- a/vnext/package.json +++ b/vnext/package.json @@ -93,6 +93,7 @@ "react-content-loader": "^6.2.0", "react-cookie": "^4.1.1", "react-dom": "18.2.0", + "react-helmet": "^6.1.0", "react-hook-form": "^7.38.0", "react-hot-toast": "^2.4.0", "react-router-dom": "^6.4.2", diff --git a/vnext/src/ui/Chat.js b/vnext/src/ui/Chat.js index cdf3de1b..6bcff837 100644 --- a/vnext/src/ui/Chat.js +++ b/vnext/src/ui/Chat.js @@ -10,6 +10,7 @@ import { getChat, pm } from '../api'; import './Chat.css'; import { useVisitor } from './VisitorContext'; +import { Helmet } from 'react-helmet'; /** * @typedef {Object} ChatProps @@ -66,6 +67,9 @@ export default function Chat(props) { const uname = params.user; return (