Well it seems a little unordinary and it s coming from moralis, or somewhere else, because I think I have seen the error before, but its this error below. I really just need to know what it is and should I be worried about it , because the code still does what I want it to.
------------------------------------------------------------------------------ error :
TypeError: cyclic object value
parseData (index):8
i (index):10
i (index):10
onCommitFiberRoot (index):10
React 2
unstable_runWithPriority scheduler.development.js:468
React 4
unstable_runWithPriority scheduler.development.js:468
React 5
logout _useMoralisAuth.ts:293
step tslib.es6.js:102
verb tslib.es6.js:83
fulfilled tslib.es6.js:73
promise callback*step tslib.es6.js:75
__awaiter tslib.es6.js:76
__awaiter tslib.es6.js:72
logout vendors~main.chunk.js:240855
onClick Authentication.tsx:42
React 14
unstable_runWithPriority scheduler.development.js:468
React 4
index.js:1
null false false null Authentication.tsx:20
----------------------------------------------------------- code:
import { Stack } from "@chakra-ui/layout";
import { Box, Button, HStack, Image } from "@chakra-ui/react";
import { useMoralis } from "react-moralis";
import { CheckIcon } from "@chakra-ui/icons";
import React from "react";
export default function Authentication() {
const { user } = useMoralis();
//const [username, setUsername] = React.useState<string>("");
const {
authenticate,
authError,
isAuthenticated,
isAuthenticating,
logout,
} = useMoralis();
console.log(
user,
isAuthenticated,
isAuthenticating,
authError)
return (
<div>
<Stack spacing={6}>
<Image src="Xheader.jpg" alt="" />
<Box>
{isAuthenticated ? (
<><text>Authenticated with Metamask!</text><CheckIcon ml={2} w={8} h={8} color="green.500"/>
<Button onClick={() => logout()}>Logout</Button></>
) : (
<HStack>
<Button onClick={() => authenticate()}>Authenticate w Metamask</Button>
<Button onClick={() => authenticate({ provider: "walletconnect" })}>Authenticate Walletconnect</Button>
</HStack>
)}
</Box>
</Stack>
</div>
);
}