import { useCreateSpace } from '@towns-protocol/react-sdk'
function useCreateSpace(
config?: ActionConfig<Spaces["createSpace"]>,
): {
data: {
spaceId: string;
defaultChannelId: string;
} | undefined;
error: Error | undefined;
isPending: boolean;
isSuccess: boolean;
isError: boolean;
createSpace: (params: Partial<Omit<CreateSpaceParams, "spaceName">> & {
spaceName: string;
}, signer: Signer) => Promise<{
spaceId: string;
defaultChannelId: string;
}>;
}
ActionConfig<Spaces["createSpace"]>
createSpace
action and its loading state.
{
data: {
spaceId: string;
defaultChannelId: string;
} | undefined;
error: Error | undefined;
isPending: boolean;
isSuccess: boolean;
isError: boolean;
createSpace: (params: Partial<Omit<CreateSpaceParams, "spaceName">> & {
spaceName: string;
}, signer: Signer) => Promise<{
spaceId: string;
defaultChannelId: string;
}>;
}
Was this page helpful?