From c6f12d66febf1c29353186f51db3400385169b9d Mon Sep 17 00:00:00 2001
From: Vercin-G <97210222+Vercin-G@users.noreply.github.com>
Date: Sat, 30 Sep 2023 16:28:50 -0600
Subject: [PATCH] SE noindex + doc title switching
---
client/public/index.html | 1 +
client/src/index.js | 6 +++---
client/src/pages/Activedutyroster.js | 5 ++++-
client/src/pages/CavApps.js | 7 ++++++-
client/src/pages/Rosterstatistics.js | 10 ++++++++--
5 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/client/public/index.html b/client/public/index.html
index 3a6fb40..8eafee6 100644
--- a/client/public/index.html
+++ b/client/public/index.html
@@ -1,6 +1,7 @@
+
diff --git a/client/src/index.js b/client/src/index.js
index 4f12c75..3220ef6 100644
--- a/client/src/index.js
+++ b/client/src/index.js
@@ -15,9 +15,9 @@ export default function App() {
}>
- } />
- } />
- } />
+ } />
+ } />
+ } />
} />
diff --git a/client/src/pages/Activedutyroster.js b/client/src/pages/Activedutyroster.js
index e368fe4..2d47fe8 100644
--- a/client/src/pages/Activedutyroster.js
+++ b/client/src/pages/Activedutyroster.js
@@ -15,7 +15,7 @@ const millisecondsToMinutes = (milliseconds) => {
// import {Helmet} from 'react-helmet';
-function ActiveDutyRoster() {
+function ActiveDutyRoster(props) {
const [milpacList, setMilpacList] = useState([]);
const [reserveList, setReserveList] = useState([]);
const [loading, setLoading] = useState(true);
@@ -29,6 +29,9 @@ function ActiveDutyRoster() {
})(window, document, "clarity", "script", "dig85agbqz");
`;
+ // Change Page Title
+ useEffect(() => document.title = props.title, [])
+
// Reusable API fetching function
async function fetchData(url, setFunction) {
try {
diff --git a/client/src/pages/CavApps.js b/client/src/pages/CavApps.js
index 59e4db4..0210174 100644
--- a/client/src/pages/CavApps.js
+++ b/client/src/pages/CavApps.js
@@ -1,8 +1,13 @@
import { Outlet, Link } from "react-router-dom";
import Logo from '../style/themes/7cav/appsLogo'
import './CavApps.css';
+import React, { useEffect } from "react";
+
+function CavApps(props) {
+
+ // Change Page Title
+ useEffect(() => document.title = props.title, [])
-function CavApps() {
return (
diff --git a/client/src/pages/Rosterstatistics.js b/client/src/pages/Rosterstatistics.js
index 1f48b29..5c241a1 100644
--- a/client/src/pages/Rosterstatistics.js
+++ b/client/src/pages/Rosterstatistics.js
@@ -1,5 +1,11 @@
-const Statistics = () => {
- return
Pending Rework!
;
+import React, { useEffect } from "react";
+
+const Statistics = (props) => {
+
+ // Change Page Title
+ useEffect(() => document.title = props.title, [])
+
+ return Pending Rework!
;
};
export default Statistics;