here bro i did that here is mt code
import { useMoralisCloudFunction } from "react-moralis";
import Banner from "../../components/authorPage/Banner/Banner";
import AuthorProfile2 from "../../components/authorPage/AuthorProfile2/AuthorProfileCard";
import dynamic from "next/dynamic";
import Head from "next/head";
import { Moralis } from "moralis-v1";
function Socials({ userData }) {
const AuthorTaps = dynamic(
() => import("../../components/authorPage/AuthorTaps2/AuthorTaps"),
{ ssr: true }
);
return (
<div>
<Head>
<title>{userData?.get("username")} | OneFire</title>
<meta
property="og:title"
content="OneFire | art is the voice of artist"
/>
<meta
name="twitter:title"
content="OneFire | art is the voice of artist"
/>
<meta name="description" content={userData?.get("description")} />
<meta
property="og:description"
content={userData?.get("description")}
/>
<meta
name="twitter:description"
content={userData?.get("description")}
/>
<meta
property="og:image"
content={
!userData.get("ProfilePic") &&
`https://avatars.dicebear.com/api/avataaars/${userData?.get(
"username"
)}.svg` ||
userData.get("ProfilePic")
}
/>
<meta
name="twitter:image"
content={
!userData.get("ProfilePic") &&
`https://avatars.dicebear.com/api/avataaars/${userData?.get(
"username"
)}.svg` ||
userData.get("ProfilePic")
}
/>
<meta
name="keywords"
content="onefire, nft marketplace, collectibles, fine art, profile"
/>
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@onefiree" />
<meta name="twitter:creator" content="@onefiree" />
</Head>
<Banner
bannerImage={
"https://ipfs.io/ipfs/QmReUKPY8okoTNM6ky9iyATgAqQ1kF2pVQN8vipNDybooJ"
}
/>
<AuthorProfile2 />
<AuthorTaps params={{ ethAddress: userData.get("ethAddress") }} />
</div>
);
}
export async function getStaticPaths() {
await Moralis.start({
serverUrl: process.env.NEXT_PUBLIC_SEVER_URL,
appId: process.env.NEXT_PUBLIC_APP_ID,
masterKey: process.env.NEXT_PUBLIC_MORALIS_MASTER_KEY,
});
const { data } = await Moralis.Cloud.run("getAllUsers");
const paths = data.map((user) => ({
params: { userId: user.get("ethAddress") },
}));
return {
paths,
fallback: true,
};
}
export async function getStaticProps({ params }) {
await Moralis.start({
serverUrl: process.env.NEXT_PUBLIC_SEVER_URL,
appId: process.env.NEXT_PUBLIC_APP_ID,
masterKey: process.env.NEXT_PUBLIC_MORALIS_MASTER_KEY,
});
const user = await new Moralis.Query("User")
.equalTo("ethAddress", params.userId)
.first();
return {
props: { user: user.toJSON() },
revalidate: 1,
};
}
now im getting this error
ReferenceError: localStorage is not defined
im using next js