diff --git a/src/components/common/FollowingButton.tsx b/src/components/common/FollowingButton.tsx index cc654196..d03652df 100644 --- a/src/components/common/FollowingButton.tsx +++ b/src/components/common/FollowingButton.tsx @@ -2,8 +2,6 @@ import { Trans, useTranslation } from "next-i18next" import { useEffect } from "react" import { toast } from "react-hot-toast" -import { useConnectedAction } from "@crossbell/connect-kit" - import { Button } from "~/components/ui/Button" import type { Variant } from "~/components/ui/Button" import { UniLink } from "~/components/ui/UniLink" @@ -30,7 +28,7 @@ export const FollowingButton: React.FC<{ const characterId = site?.metadata?.proof ? Number(site.metadata.proof) : null const { t } = useTranslation("common") - const handleClickSubscribe = useConnectedAction(() => { + const handleClickSubscribe = () => { if (characterId) { if (subscription.data) { unsubscribeFromSite.mutate({ @@ -44,7 +42,7 @@ export const FollowingButton: React.FC<{ } as any) } } - }) + } const subscription = useGetSubscription(site?.username) diff --git a/src/components/main/MainSidebar.tsx b/src/components/main/MainSidebar.tsx index f2216643..770b8586 100644 --- a/src/components/main/MainSidebar.tsx +++ b/src/components/main/MainSidebar.tsx @@ -1,7 +1,6 @@ import { useTranslation } from "next-i18next" import { useState } from "react" -import { useConnectedAction } from "@crossbell/connect-kit" import { useRefCallback } from "@crossbell/util-hooks" import { CharacterFloatCard } from "~/components/common/CharacterFloatCard" @@ -36,9 +35,9 @@ export function MainSidebar({ hideSearch }: { hideSearch?: boolean }) { } as any) }) - const followAll = useConnectedAction(() => { + const followAll = () => { doSubscribeToSites() - }) + } const [showcaseMore, setShowcaseMore] = useState(false) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 7191e399..baae45b8 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -5,7 +5,7 @@ import { useRouter } from "next/router" import { ReactElement, useState } from "react" import { Element, Link } from "react-scroll" -import { useAccountState, useConnectedAction } from "@crossbell/connect-kit" +import { useAccountState } from "@crossbell/connect-kit" import { CrossbellChainLogo, XCharLogo, @@ -57,9 +57,9 @@ function Home() { const showcaseSites = useGetSites(showcase) const { t } = useTranslation("index") - const tryNow = useConnectedAction(() => { + const tryNow = () => { router.push("/dashboard") - }) + } const features: { title: string @@ -248,9 +248,9 @@ function Home() { } as any) }) - const followAll = useConnectedAction(() => { + const followAll = () => { doSubscribeToSites() - }) + } const [showcaseMore, setShowcaseMore] = useState(false)