Skip to content

Commit

Permalink
DBC22-1117: updated page titles
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-oxd authored and fatbird committed Feb 14, 2024
1 parent c6493e8 commit ce71c05
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/frontend/src/pages/AdvisoriesListPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import PageHeader from '../PageHeader';
import './AdvisoriesListPage.scss';

export default function AdvisoriesListPage() {
document.title = 'DriveBC - Advisories';

// Redux
const dispatch = useDispatch();
const { advisories } = useSelector(useCallback(memoize(state => ({
Expand Down
2 changes: 2 additions & 0 deletions src/frontend/src/pages/AdvisoryDetailsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ export default function AdvisoryDetailsPage() {
fitMap(advisoryData);

isInitialMount.current = false;

document.title = `DriveBC - Advisories - ${advisoryData.title}`;
};

useEffect(() => {
Expand Down
2 changes: 2 additions & 0 deletions src/frontend/src/pages/BulletinDetailsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export default function BulletinDetailsPage() {
const bulletinData = await getBulletins(params.id);
setBulletin(bulletinData);
isInitialMount.current = false;

document.title = `DriveBC - Bulletins - ${bulletinData.title}`;
};

useEffect(() => {
Expand Down
2 changes: 2 additions & 0 deletions src/frontend/src/pages/BulletinsListPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import Footer from '../Footer';
import PageHeader from '../PageHeader';

export default function BulletinsListPage() {
document.title = 'DriveBC - Bulletins';

// Redux
const dispatch = useDispatch();
const { bulletins } = useSelector(useCallback(memoize(state => ({
Expand Down
2 changes: 2 additions & 0 deletions src/frontend/src/pages/CameraDetailsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ export default function CameraDetailsPage() {

// Last update time
setLastUpdate(camera.last_update_modified);

document.title = `DriveBC - Cameras - ${camera.name}`;
}

const loadReplay = async (cam) => {
Expand Down
2 changes: 2 additions & 0 deletions src/frontend/src/pages/CamerasListPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import RouteSearch from '../Components/map/RouteSearch';
import './CamerasListPage.scss';

export default function CamerasListPage() {
document.title = 'DriveBC - Cameras';

// Redux
const dispatch = useDispatch();
const { cameras, camTimeStamp, selectedRoute } = useSelector(useCallback(memoize(state => ({
Expand Down
2 changes: 2 additions & 0 deletions src/frontend/src/pages/EventsListPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ import './EventsListPage.scss';
import '../Components/Filters.scss';

export default function EventsListPage() {
document.title = 'DriveBC - Delays';

// Redux
const dispatch = useDispatch();
const { events, eventTimeStamp, selectedRoute } = useSelector(useCallback(memoize(state => ({
Expand Down
2 changes: 2 additions & 0 deletions src/frontend/src/pages/FeedbackPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import Footer from '../Footer';
import PageHeader from '../PageHeader';

export default function FeedbackPage() {
document.title = 'DriveBC - Feedback';

// States
const [ email, setEmail ] = useState();
const [ subject, setSubject ] = useState(0);
Expand Down
2 changes: 2 additions & 0 deletions src/frontend/src/pages/MapPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import '../Components/Map.scss';
export default function MapPage() {
const { state } = useLocation();

document.title = 'DriveBC';

return (
<DndProvider options={HTML5toTouch}>
<div className="map-wrap">
Expand Down

0 comments on commit ce71c05

Please sign in to comment.