chore(deps): cleanup unused dependencies and update dependencies
This commit is contained in:
3 files changed
+1
-97
No files matched your search
@@ -1,16 +0,0 @@
|
||||
import { matchPath, useLocation } from "react-router-dom";
|
||||
|
||||
function useRouteMatch(patterns: readonly string[]) {
|
||||
const { pathname } = useLocation();
|
||||
|
||||
for (let i = 0; i < patterns.length; i += 1) {
|
||||
const pattern = patterns[i];
|
||||
const possibleMatch = matchPath(pattern, pathname);
|
||||
if (possibleMatch !== null) {
|
||||
return possibleMatch;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
export default useRouteMatch;
|
||||
Reference in new issue
Block a user