@adonis-agora/authkit-react
Version:
Frontend ergonomics over AuthKit for AdonisJS + Inertia + React apps: a typed useAuth() hook, role-gating hooks and gating components.
14 lines (13 loc) • 407 B
TypeScript
import type { AuthUser } from '../types.js';
import { type ResourceState } from './use_resource.js';
export interface ProfileUpdate {
name?: string;
avatarUrl?: string;
[key: string]: unknown;
}
export interface UseProfileResult extends ResourceState<AuthUser> {
actions: {
update(data: ProfileUpdate): Promise<void>;
};
}
export declare function useProfile(): UseProfileResult;