(meta: RecentPageMeta)
| 22 | // Entity pages (squad, source, profile) already hold the avatar the sidebar |
| 23 | // row wants, so they hand it to the store instead of leaving the row to fetch. |
| 24 | export const useRecentPageMeta = (meta: RecentPageMeta): void => { |
| 25 | const router = useRouter(); |
| 26 | const path = router?.asPath?.split('?')[0].split('#')[0]; |
| 27 | const { image } = meta; |
| 28 | |
| 29 | useEffect(() => { |
| 30 | if (!path || !image) { |
| 31 | return; |
| 32 | } |
| 33 | |
| 34 | updateRecentPageMeta(path, { image }); |
| 35 | }, [path, image]); |
| 36 | }; |
| 37 | |
| 38 | const brandSuffix = /\s*[|·\-–—]\s*daily\.dev\s*$/i; |
| 39 | const cleanTitle = (title: string): string => |
no test coverage detected