OpenHands / frontend /src /hooks /use-is-on-tos-page.ts
Backup-bdg's picture
Upload 565 files
b59aa07 verified
raw
history blame contribute delete
351 Bytes
import { useLocation } from "react-router";
/**
* Hook to check if the current page is the Terms of Service acceptance page.
*
* @returns {boolean} True if the current page is the TOS acceptance page, false otherwise.
*/
export const useIsOnTosPage = (): boolean => {
const { pathname } = useLocation();
return pathname === "/accept-tos";
};