diff --git a/src/components/General/useTitle.jsx b/src/components/General/useTitle.jsx new file mode 100644 index 000000000..70bc9ba38 --- /dev/null +++ b/src/components/General/useTitle.jsx @@ -0,0 +1,9 @@ +import { useEffect } from 'react'; + +const useTitle = title => { + useEffect(() => { + document.title = `UCLA ACM Hack | ${title}`; + }, []); +}; + +export default useTitle; diff --git a/src/pages/About.jsx b/src/pages/About.jsx index ae5ae95a0..7bdd78968 100644 --- a/src/pages/About.jsx +++ b/src/pages/About.jsx @@ -3,8 +3,10 @@ import '../styles/About.css'; import Team from '../components/About/Team'; import Alumni from '../components/About/Alumni'; import { teamIntro } from '../data/profiles.js'; +import useTitle from '../components/General/useTitle.jsx'; export default function About() { + useTitle('About'); return (