Hook to join a space.
Imports
import { useJoinSpace } from '@towns-protocol/react-sdk'
Definition
function useJoinSpace(
config?: ActionConfig<Spaces["joinSpace"]>,
): {
data: void | undefined;
error: Error | undefined;
isPending: boolean;
isSuccess: boolean;
isError: boolean;
joinSpace: (spaceId: string, signer: Signer, opts?: {
skipMintMembership?: boolean;
} | undefined) => Promise<void>;
}
Source: useJoinSpace
Parameters
config
- Type:
ActionConfig<Spaces["joinSpace"]>
- Optional
Configuration options for the action.
Return Type
The joinSpace action and the status of the action.
{
data: void | undefined;
error: Error | undefined;
isPending: boolean;
isSuccess: boolean;
isError: boolean;
joinSpace: (spaceId: string, signer: Signer, opts?: {
skipMintMembership?: boolean;
} | undefined) => Promise<void>;
}