Hey. I get an error “You need to call Moralis start with appId before using Moralis”. I tried to use useEffect with isInitialized but i didnt work for this component. What should i do to get rid of this error? I use isInitialized in other components and they all work fine.
My goal is if the current user is the owner of contract, it could see the tab and its content otherwise couldnt.
const Interaction = () => {
const [key, setKey] = useState('');
const { Moralis, isInitialized, user, logout } = useMoralis();
const owner = contract_address;
const address = () => {
return Moralis.User.current().get("ethAddress");
}
useEffect(() => {
if (isInitialized) {
address();
}
}, [isInitialized]);
return (
<div className='container'>
<Tabs
variant='tabs'
id="controlled-tab-example"
activeKey={key}
onSelect={(k) => setKey(k)}
className="container col-md-7"
>
{address() == owner.toLowerCase() && (
<Tab eventKey="addTeacher" title="Öğretmen Ekle">
<h1>as</h1>
</Tab>)
}
</Tabs>
</div>
)
}
export default Interaction```