Skip to content

Commit df5c9fc

Browse files
minor fix
1 parent 308cb70 commit df5c9fc

File tree

3 files changed

+383
-108
lines changed

3 files changed

+383
-108
lines changed

framework/hooks/use-hunter-data.hook.ts

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,16 @@ export default function useHunterData() {
136136
// First initiate name to shortened wallet address
137137
var name = address.slice(0, 6).concat("...").concat(address.slice(-4))
138138
var findName = ""
139-
140-
if (findProfiles[address] != null) {
141-
if (findProfiles[address].name != "") {
142-
name = findProfiles[address].name
143-
}
144-
if (findProfiles[address].findName != "") {
145-
name = findProfiles[address].findName + ".find"
146-
findName = name
147-
findNames[findName] = address
139+
if (findProfiles) {
140+
if (findProfiles[address] != null) {
141+
if (findProfiles[address].name != "") {
142+
name = findProfiles[address].name
143+
}
144+
if (findProfiles[address].findName != "") {
145+
name = findProfiles[address].findName + ".find"
146+
findName = name
147+
findNames[findName] = address
148+
}
148149
}
149150
}
150151

@@ -192,14 +193,15 @@ export default function useHunterData() {
192193
let data = hunterDataRanked[item]
193194
//check avatar
194195
var avatar = profilePictures[1].image
195-
196-
if (findProfiles[data.address] != null) {
197-
for (let key in profilePictures) {
198-
let picture =
199-
profilePictures[key as unknown as keyof typeof profilePictures]
200-
.image
201-
if (findProfiles[data.address].avatar == picture) {
202-
avatar = picture
196+
if (findProfiles) {
197+
if (findProfiles[data.address] != null) {
198+
for (let key in profilePictures) {
199+
let picture =
200+
profilePictures[key as unknown as keyof typeof profilePictures]
201+
.image
202+
if (findProfiles[data.address].avatar == picture) {
203+
avatar = picture
204+
}
203205
}
204206
}
205207
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"@fortawesome/react-fontawesome": "^0.1.15",
1919
"@headlessui/react": "^1.6.4",
2020
"@heroicons/react": "v1",
21-
"@onflow/fcl": "1.1.0",
22-
"@onflow/types": "^1.0.3",
21+
"@onflow/fcl": "^1.5.1",
22+
"@onflow/types": "^1.1.0",
2323
"@tailwindcss/aspect-ratio": "^0.4.0",
2424
"@tanstack/match-sorter-utils": "^8.1.1",
2525
"@tanstack/react-table": "^8.5.11",

0 commit comments

Comments
 (0)