fix: use the operator sign to follow when not connected to a wallet
This commit is contained in:
parent
817191435d
commit
dab5ad99dc
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue