Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions packages/plugins/CyberConnect/src/SNSAdaptor/ConnectButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default function ConnectButton({
}) {
const { classes, cx } = useStyles()
const web3 = useWeb3(NetworkPluginID.PLUGIN_EVM)
const myAddress = useAccount(NetworkPluginID.PLUGIN_EVM)
const myAddress = useAccount()
const [cc, setCC] = useState<CyberConnect | null>(null)
const [isFollowing, setFollowing] = useState(false)
const [isLoading, setLoading] = useState(false)
Expand Down Expand Up @@ -134,9 +134,15 @@ export default function ConnectButton({
}
}, [cc, myAddress, isFollowing])

if (!myAddress)
return (
<Typography variant="body2" sx={{ marginTop: 2 }}>
Please connect your wallet first
</Typography>
)
if (blockChainNetwork !== NetworkPluginID.PLUGIN_EVM) {
return (
<Typography variant="body2" sx={{ marginTop: 2, color: MaskColorVar.cyberconnectPrimary }}>
<Typography variant="body2" sx={{ marginTop: 2 }}>
Please switch to EVM-based wallet to follow
</Typography>
)
Expand Down
2 changes: 2 additions & 0 deletions packages/plugins/CyberConnect/src/SNSAdaptor/FollowTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export default function FollowTab({
sx={{
color: 'black',
width: '100%',
boxSizing: 'border-box',
}}>
{followingList.map((f: IFollowIdentity) => {
return <FollowRow key={f.address} identity={f} />
Expand All @@ -100,6 +101,7 @@ export default function FollowTab({
sx={{
color: 'black',
width: '100%',
boxSizing: 'border-box',
}}>
{followerList.map((f: IFollowIdentity) => {
return <FollowRow key={f.address} identity={f} />
Expand Down