mirror of
https://github.com/deiucanta/chatpad.git
synced 2026-03-11 09:04:31 +00:00
7 lines
207 B
TypeScript
7 lines
207 B
TypeScript
import { useMatchRoute } from "@tanstack/react-location";
|
|
|
|
export function useChatId() {
|
|
const matchRoute = useMatchRoute();
|
|
const match = matchRoute({ to: "/chats/:chatId" });
|
|
return match?.chatId;
|
|
}
|