11import { createLazyFileRoute } from '@tanstack/react-router' ;
2- import { useState , useEffect , useRef } from 'react' ;
2+ import { useState , useEffect } from 'react' ;
33import { useSearch } from '../hooks/useSearch' ;
44import { useProfile } from '../hooks/useProfile' ;
55import { Link } from '@tanstack/react-router' ;
6- import { LuSearch , LuMapPin , LuMail , LuGlobe , LuTwitter , LuGithub , LuMessageSquare , LuSend , LuWallet } from "react-icons/lu" ;
6+ import { LuSearch , LuMapPin , LuMail , LuGlobe , LuTwitter , LuGithub , LuMessageSquare , LuSend } from "react-icons/lu" ;
77import { useDebounce } from 'use-debounce' ;
88import { getChainIconUrl } from '../utils/chainIcons' ;
99import { shouldAttemptDirectLookup } from '../utils/validation' ;
@@ -53,7 +53,8 @@ function ProfileFallback({ searchTerm }: { searchTerm: string }) {
5353 < div className = "max-w-2xl mx-auto bg-white rounded-lg overflow-hidden shadow-sm" >
5454 < Link
5555 to = "/$profileId"
56- params = { { profileId : profile . name || profile . address } }
56+ // @ts -ignore
57+ params = { { profileId : profile . name } }
5758 className = "block"
5859 >
5960 < div className = "relative" >
@@ -140,12 +141,6 @@ function Home() {
140141 return profile . records ?. description || '' ;
141142 } ;
142143
143- // Helper function to get the best profileId (ENS name preferred over address)
144- const getProfileId = ( profile : any ) => {
145- // Prefer ENS name if available, otherwise use address
146- return profile . name || profile . address ;
147- } ;
148-
149144 // Render search results or appropriate message
150145 const renderResults = ( ) => {
151146 // Case 1: We have data to show
@@ -162,7 +157,9 @@ function Home() {
162157 < div key = { profile . name + index } className = "bg-white rounded-lg overflow-hidden shadow-sm hover:shadow-md transition-all duration-200" >
163158 < Link
164159 to = "/$profileId"
165- params = { { profileId : getProfileId ( profile ) } }
160+ // params={{ profileId: profile.name || profile.address }}
161+ // @ts -ignore
162+ params = { { profileId : profile . name } }
166163 className = "block h-full"
167164 >
168165 < div className = "relative" >
@@ -291,7 +288,8 @@ function Home() {
291288 < div key = { profile . name + index } className = "bg-white rounded-lg overflow-hidden shadow-sm hover:shadow-md transition-all duration-200" >
292289 < Link
293290 to = "/$profileId"
294- params = { { profileId : getProfileId ( profile ) } }
291+ // @ts -ignore
292+ params = { { profileId : profile . name } }
295293 className = "block h-full"
296294 >
297295 < div className = "relative" >
0 commit comments