@auth-kit/next
Version:
Next Js Plugin for React Auth Kit
15 lines (14 loc) • 801 B
TypeScript
import { IRouter } from 'react-auth-kit/route/IRouter';
/**
* `NextPlugin` is an object that provides utility methods for navigating
* within a Next.js application and retrieving the current path.
*
* Properties:
* - `navigate`: A function to navigate to a specific path. Takes an object with a `to` property specifying the target path.
* - `useNavigate`: A hook to create a navigation function. Returns a function that takes an object with a `to` property and performs navigation.
* - `usePath`: A hook to retrieve the current pathname. Returns a function that, when called, gives the current pathname as a string.
*
* This plugin is useful for integrating programmatic navigation and path handling in a Next.js environment.
*/
declare const NextPlugin: IRouter;
export default NextPlugin;