mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
9 lines
271 B
TypeScript
9 lines
271 B
TypeScript
import { useMatch, useResolvedPath } from 'react-router-dom';
|
|
|
|
export const useRouterTab = () => {
|
|
const routerTabPathMatch = useMatch(useResolvedPath(':tab').pathname);
|
|
const routerTab = routerTabPathMatch?.params?.tab || false;
|
|
|
|
return { routerTab } as const;
|
|
};
|