From 9ba13ab4cdafab49d8b41242f42edd111d2db55f Mon Sep 17 00:00:00 2001 From: Gregory Campbell Date: Wed, 3 Jun 2026 21:48:00 -0400 Subject: [PATCH] feat: SEO (react-helmet-async), ProjectCard, lazy images, build fixes --- package-lock.json | 31 ++++++ package.json | 2 + src/404.js | 11 ++- src/App.js | 31 +++--- src/Contact.js | 12 ++- src/Home.js | 14 +-- src/Projects.js | 171 +++++++++++++++------------------- src/Resume.js | 14 +-- src/components/ProjectCard.js | 22 +++++ 9 files changed, 177 insertions(+), 131 deletions(-) create mode 100644 src/components/ProjectCard.js diff --git a/package-lock.json b/package-lock.json index a1a16e7fb..16a1ec727 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,6 +22,8 @@ "react": "^17.0.1", "react-bootstrap": "^1.2.2", "react-dom": "^17.0.1", + "react-helmet-async": "^1.3.0", + "react-is": "^19.2.7", "react-router-dom": "^5.2.0", "react-scripts": "^5.0.1", "styled-components": "^5.1.1" @@ -44851,6 +44853,35 @@ "integrity": "sha512-SN/U6Ytxf1QGkw/9ve5Y+NxBbZM6Ht95tuXNMKs8EJyFa/Vy/+Co3stop3KBHARfn/giv+Lj1uUnTfOJ3moFEQ==", "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==", + "license": "MIT" + }, + "node_modules/react-helmet-async": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/react-helmet-async/-/react-helmet-async-1.3.0.tgz", + "integrity": "sha512-9jZ57/dAn9t3q6hneQS0wukqC2ENOBgMNVEhb/ZG9ZSxUetzVIw4iAmEU38IaVg3QGYauQPhSeUTuIUtFglWpg==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime": "^7.12.5", + "invariant": "^2.2.4", + "prop-types": "^15.7.2", + "react-fast-compare": "^3.2.0", + "shallowequal": "^1.1.0" + }, + "peerDependencies": { + "react": "^16.6.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.6.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/react-is": { + "version": "19.2.7", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.7.tgz", + "integrity": "sha512-kZFnouyVv7eP/Phmrlo9FK+zcAdriZJvzxXHF1Sl1P377WSGe2G/JxVolhTrB/jeV47lKImhNUsijjHAAbcl/A==", + "license": "MIT" + }, "node_modules/react-is-18": { "name": "react-is", "version": "18.3.1", diff --git a/package.json b/package.json index 5cf734521..aa17ef965 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,8 @@ "react": "^17.0.1", "react-bootstrap": "^1.2.2", "react-dom": "^17.0.1", + "react-helmet-async": "^1.3.0", + "react-is": "^19.2.7", "react-router-dom": "^5.2.0", "react-scripts": "^5.0.1", "styled-components": "^5.1.1" diff --git a/src/404.js b/src/404.js index cbac1058b..05a4c3377 100644 --- a/src/404.js +++ b/src/404.js @@ -1,12 +1,13 @@ -import React, { useEffect } from 'react'; +import React from 'react'; +import { Helmet } from 'react-helmet-async'; export const NoMatch = () => { - useEffect(() => { - document.title = '404 Error'; - }, []); - return (
+ + 404 Error + +

404 ERROR

Hey, you shouldn't be here!

diff --git a/src/App.js b/src/App.js index 5847b212e..efb06276f 100644 --- a/src/App.js +++ b/src/App.js @@ -1,5 +1,6 @@ import React from 'react'; import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; +import { HelmetProvider } from 'react-helmet-async'; import { Home } from './Home'; import { Resume } from './Resume'; import { Projects } from './Projects'; @@ -11,20 +12,22 @@ import { Jumbotron } from './components/Jumbotron'; import Footer from './components/Footer'; const App = () => ( - - - - - - - - - - - - -