push
github
Merge pull request #23 from atlp-rwanda/ft-register implement User registration (Vendors and Buyers)
34 of 74 branches covered (45.95%)
Branch coverage included in aggregate %.
645 of 732 new or added lines in 15 files covered. (88.11%)
826 of 949 relevant lines covered (87.04%)
1.09 hits per line
|
import { useEffect } from 'react'; |
1✔ |
|
import { useLocation } from 'react-router-dom'; |
1✔ |
|
|
1✔ |
|
interface PageTitleProps { |
1✔ |
|
title: string; |
1✔ |
|
} |
1✔ |
|
|
1✔ |
|
const PageTitle = ({ title }: PageTitleProps) => {
|
1✔ |
NEW
|
const location = useLocation();
|
× |
NEW
|
|
× |
NEW
|
useEffect(() => { |
× |
NEW
|
document.title = title; |
× |
NEW
|
}, [location, title]); |
× |
NEW
|
|
× |
NEW
|
return null; // This component doesn't render anything it just updates the document title |
× |
NEW
|
}; |
× |
|
|
1✔ |
|
export default PageTitle; |
1✔ |