(Desktop only) Export communities
(Desktop only) Export communities in Bitsocial React Hooks. Usage, options, and examples.
// Export one community.
const { communityExports, exportCommunity, state, error } = useExportCommunity({
communityAddress: "your-community-address.eth",
});
await exportCommunity();
// Export several communities at the same time.
const exportMany = useExportCommunity({
communityAddresses: ["community-1.eth", "community-2.eth"],
});
await exportMany.exportCommunity();
// Export every community listed by the active account's pkc client.
const exportAll = useExportCommunity();
await exportAll.exportCommunity();
if (state === "succeeded") {
console.log("started exports", communityExports);
}
if (state === "failed") {
console.log("failed to start export", error.message);
}