We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73242c2 commit 4c6b8feCopy full SHA for 4c6b8fe
pages/articles-my.js
@@ -1,17 +1,15 @@
1
import { ethers } from "ethers"
2
import { useEffect, useState } from "react"
3
import axios from "axios"
4
+import { useAccount } from "../hooks/useAccount"
5
6
import { nftmarketaddress, nftaddress } from "../config"
7
8
let ethAccount
9
export default function MyAssets() {
10
const [nfts, setNfts] = useState([])
11
const [loadingState, setLoadingState] = useState("not-loaded")
-
12
- if (typeof window !== "undefined") {
13
- ethAccount = localStorage.getItem("ethAccount")
14
- }
+ const ethAccount = useAccount()
15
16
useEffect(() => {
17
loadNFTs()
0 commit comments