Skip to content

Commit

Permalink
fix: update ci (#557)
Browse files Browse the repository at this point in the history
* fix: update ci

* fix: update ci
  • Loading branch information
sakulstra authored Aug 29, 2024
1 parent bb2e157 commit 15e00d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ name: release-please
jobs:
test-node:
uses: bgd-labs/github-workflows/.github/workflows/test-node.yml@main
secrets: inherit

release-please:
runs-on: ubuntu-latest
Expand Down
10 changes: 5 additions & 5 deletions ui/src/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,28 +42,28 @@ export const Search = ({
const uf = useMemo(() => {
const opts = {
intraMode: 1,
intraChars: "[a-z\\d'_]"
intraChars: "[a-z\\d'_]",
};
return new uFuzzy(opts);
}, []);

const performSearch = useCallback(
(search: string) => {
const searchWords = search.trim().split(/\s+/);

let results = [];
for (let idx = 0; idx < searchPaths.length; idx++) {
const path = searchPaths[idx];
const isMatch = searchWords.every((word) => {
const idxs = uf.filter([path], word);
return idxs && idxs.length > 0;
});

if (isMatch) {
results.push(addresses[idx]);
}
}

setResults(results.slice(0, SEARCH_LIMIT));
},
[searchPaths, addresses, uf],
Expand Down Expand Up @@ -168,7 +168,7 @@ export const Search = ({
<SearchResult
key={result.searchPath}
result={result}
ref={(el) => (refs.current[index] = el)}
ref={(el) => (refs.current[index] = el) as any}
tabIndex={index === activeIndex ? 0 : -1}
/>
))}
Expand Down

0 comments on commit 15e00d7

Please sign in to comment.