Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
avasisht23 committed Apr 17, 2024
1 parent 94f4429 commit fb55de7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
11 changes: 2 additions & 9 deletions packages/alchemy/src/react/hooks/useLogout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,10 @@ import { useAlchemyAccountContext } from "../context.js";
import type { BaseHookMutationArgs } from "../types.js";
import { useSigner } from "./useSigner.js";

export type UseLogoutData = void;

export type UseLogoutParams = void;

export type UseLogoutMutationArgs = BaseHookMutationArgs<
UseLogoutData,
UseLogoutParams
>;
export type UseLogoutMutationArgs = BaseHookMutationArgs<void, void>;

export type UseLogoutResult = {
logout: UseMutateFunction<UseLogoutData, Error, UseLogoutParams, unknown>;
logout: UseMutateFunction<void, Error, void, unknown>;
isLoggingOut: boolean;
error: Error | null;
};
Expand Down
5 changes: 4 additions & 1 deletion site/snippets/react/useAddPasskey.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { useAddPasskey } from "@alchemy/aa-alchemy/react";

export function ComponentWithAddPasskey() {
// Assumes the app has context of a signer with an authenticated user
/**
* Assumes the app has context of a signer with an authenticated user
* by using the `AlchemyAccountProvider` from `@alchemy/aa-alchemy/react`.
*/
const addPasskey = useAddPasskey();

return (
Expand Down
5 changes: 4 additions & 1 deletion site/snippets/react/useLogout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { useLogout } from "@alchemy/aa-alchemy/react";

export function ComponentWithLogout() {
// Assumes the app has context of a signer with an authenticated user
/**
* Assumes the app has context of a signer with an authenticated user
* by using the `AlchemyAccountProvider` from `@alchemy/aa-alchemy/react`.
*/
const { logout } = useLogout();

return (
Expand Down

0 comments on commit fb55de7

Please sign in to comment.