mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +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];
|
||
|
};
|