website/app/hooks/useMatch.ts
2023-03-07 12:10:29 +01:00

7 lines
149 B
TypeScript

import { useMatches } from "@remix-run/react";
export function useMatch() {
const matches = useMatches();
return matches[matches.length - 1];
}