Skip to content

Commit 239d072

Browse files
committed
Update search
1 parent 561a984 commit 239d072

File tree

5 files changed

+13
-16
lines changed

5 files changed

+13
-16
lines changed

packages/search/src/hooks/useProfile.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { useQuery } from '@tanstack/react-query';
2-
import axios from 'axios';
32
import { SearchResult } from './useSearch';
43

54
// We'll use the same interface as SearchResult for consistency

packages/search/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { RouterProvider, createRouter } from '@tanstack/react-router';
55
import './index.css';
66

77
// Import the generated route tree
8-
import { routeTree } from './routeTree.gen';
8+
import { routeTree } from './routeTree.gen.ts';
99

1010
// Create a query client
1111
const queryClient = new QueryClient();

packages/search/src/routes/$profileId.lazy.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
LuCopy,
1212
LuCalendar,
1313
LuUser,
14-
LuWallet
1514
} from "react-icons/lu";
1615
import { useState } from 'react';
1716
import { getChainIconUrl } from '../utils/chainIcons';

packages/search/src/routes/index.lazy.tsx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { createLazyFileRoute } from '@tanstack/react-router';
2-
import { useState, useEffect, useRef } from 'react';
2+
import { useState, useEffect } from 'react';
33
import { useSearch } from '../hooks/useSearch';
44
import { useProfile } from '../hooks/useProfile';
55
import { 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";
77
import { useDebounce } from 'use-debounce';
88
import { getChainIconUrl } from '../utils/chainIcons';
99
import { 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">

packages/search/tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@
1111
"isolatedModules": true,
1212
"noEmit": true,
1313
"jsx": "react-jsx",
14-
"strict": true,
14+
"strict": false,
1515
"noUnusedLocals": true,
1616
"noUnusedParameters": true,
1717
"noFallthroughCasesInSwitch": true,
1818
"baseUrl": ".",
1919
"paths": {
2020
"@/*": ["src/*"]
21-
}
21+
},
22+
"strictNullChecks": true
2223
},
2324
"include": ["src"],
2425
"references": [{ "path": "./tsconfig.node.json" }]

0 commit comments

Comments
 (0)