chore(deps): cleanup unused dependencies and update dependencies

This commit is contained in:
Prayag Prajapati committed 2024-07-29 11:43:19 +05:30
1 parent c1d0c715cf
commit e92315b114
3 files changed
+1 -97

No files matched your search

-16
View File
@@ -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;