mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
6 lines
193 B
TypeScript
6 lines
193 B
TypeScript
|
import { useParams } from 'react-router-dom';
|
||
|
|
||
|
export const useOptionalPathParam = (key: string): string | undefined => {
|
||
|
return useParams<{ [key: string]: string | undefined }>()[key];
|
||
|
};
|