diff --git a/client/package-lock.json b/client/package-lock.json index fb505a0a..d53ed8f9 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -23,6 +23,8 @@ "@types/react-dom": "^18.2.0", "@types/react-router-dom": "^5.1.7", "axios": "^0.26.1", + "classname": "^0.0.0", + "classnames": "^2.5.1", "jest": "26.6.0", "jsonwebtoken": "^9.0.0", "react": "^18.2.0", @@ -39,6 +41,7 @@ "yup": "^0.32.11" }, "devDependencies": { + "@types/classnames": "^2.3.1", "@types/jest": "^26.0.23", "@types/jsonwebtoken": "^8.5.4", "@types/node": "^15.6.0", @@ -4144,6 +4147,16 @@ "@types/node": "*" } }, + "node_modules/@types/classnames": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@types/classnames/-/classnames-2.3.1.tgz", + "integrity": "sha512-zeOWb0JGBoVmlQoznvqXbE0tEC/HONsnoUNH19Hc96NFsTAwTXbTqb8FMYkru1F/iqp7a18Ws3nWJvtA1sHD1A==", + "deprecated": "This is a stub types definition. classnames provides its own type definitions, so you do not need this installed.", + "dev": true, + "dependencies": { + "classnames": "*" + } + }, "node_modules/@types/connect": { "version": "3.4.35", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", @@ -6269,6 +6282,16 @@ "node": ">=0.10.0" } }, + "node_modules/classname": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/classname/-/classname-0.0.0.tgz", + "integrity": "sha512-kkhsspEJdUW+VhuvNzb2sQf0KbafDPfd36dB1qf03Uu42dWZwMQzaQuyNkaRr5ir0ZiAN0+TlH/EOOfwb/aaXg==" + }, + "node_modules/classnames": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==" + }, "node_modules/clean-css": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.2.tgz", @@ -24541,6 +24564,15 @@ "@types/node": "*" } }, + "@types/classnames": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@types/classnames/-/classnames-2.3.1.tgz", + "integrity": "sha512-zeOWb0JGBoVmlQoznvqXbE0tEC/HONsnoUNH19Hc96NFsTAwTXbTqb8FMYkru1F/iqp7a18Ws3nWJvtA1sHD1A==", + "dev": true, + "requires": { + "classnames": "*" + } + }, "@types/connect": { "version": "3.4.35", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", @@ -26218,6 +26250,16 @@ } } }, + "classname": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/classname/-/classname-0.0.0.tgz", + "integrity": "sha512-kkhsspEJdUW+VhuvNzb2sQf0KbafDPfd36dB1qf03Uu42dWZwMQzaQuyNkaRr5ir0ZiAN0+TlH/EOOfwb/aaXg==" + }, + "classnames": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==" + }, "clean-css": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.2.tgz", diff --git a/client/package.json b/client/package.json index 4e944241..a3a837c0 100644 --- a/client/package.json +++ b/client/package.json @@ -18,6 +18,8 @@ "@types/react-dom": "^18.2.0", "@types/react-router-dom": "^5.1.7", "axios": "^0.26.1", + "classname": "^0.0.0", + "classnames": "^2.5.1", "jest": "26.6.0", "jsonwebtoken": "^9.0.0", "react": "^18.2.0", @@ -57,6 +59,7 @@ ] }, "devDependencies": { + "@types/classnames": "^2.3.1", "@types/jest": "^26.0.23", "@types/jsonwebtoken": "^8.5.4", "@types/node": "^15.6.0", diff --git a/client/src/components/Header.tsx b/client/src/components/Header.tsx index 5cebeadc..d5e49a01 100644 --- a/client/src/components/Header.tsx +++ b/client/src/components/Header.tsx @@ -155,6 +155,10 @@ function Header() { history.push('/'); }; + const handleMakePostClick = () => { + history.push(routes.MakePost.path); // Ensure this matches your route definition + }; + return ( {/* if no color defaults to primary */} @@ -168,7 +172,22 @@ function Header() { {/* Mailbox icon here */} {/* Bell icon here */} {/* Profile icon here */} - + + )} + + + + ); +}; + +export default MakePost;