Mustajab Ikram f1fff4ca0c
feat: show page name in document title using React Helmet (#3229)
* feat: show page name in document title using React Helmet

* fix: add translation support for page titles

* feat: title is updated

---------

Co-authored-by: Palash Gupta <palashgdev@gmail.com>
2023-08-02 15:14:15 +05:30

10 lines
222 B
TypeScript

import ROUTES from 'constants/routes';
export function getRouteKey(pathname: string): string {
const [routeKey] = Object.entries(ROUTES).find(
([, value]) => value === pathname,
) || ['DEFAULT'];
return routeKey;
}