Skip to content

Commit f5d9afd

Browse files
fix: linting issues (#8767)
1 parent ba22974 commit f5d9afd

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

packages/app/src/app/pages/Dashboard/Content/routes/Search/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const SearchComponent = () => {
1919
} = useAppState();
2020
const location = useLocation();
2121
const query = new URLSearchParams(location.search).get('query');
22-
const [items, _, isLoadingQuery] = useGetItems({
22+
const [items, , isLoadingQuery] = useGetItems({
2323
query,
2424
username: user?.username,
2525
getFilteredSandboxes,

packages/app/src/app/pages/Dashboard/Content/routes/Search/searchItems.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const SEARCH_KEYS = [
2323
] as const;
2424

2525
interface SearchIndex {
26-
fuses: Record<string, Fuse<DashboardItem>>;
26+
fuses: Record<string, Fuse<DashboardItem, any>>;
2727
weights: Record<string, number>;
2828
items: DashboardItem[];
2929
}
@@ -34,7 +34,7 @@ const buildSearchIndex = (dashboard: any, activeTeam: string): SearchIndex => {
3434
const folders: DashboardItem[] = (dashboard.allCollections || [])
3535
.map((c: Collection) => ({
3636
...c,
37-
title: c.name,
37+
title: c.path,
3838
}))
3939
.filter(f => f.title);
4040

@@ -49,13 +49,13 @@ const buildSearchIndex = (dashboard: any, activeTeam: string): SearchIndex => {
4949
const items = [...sandboxes, ...folders, ...repos];
5050

5151
// build a Fuse instance per key
52-
const fuses: Record<string, Fuse<DashboardItem>> = {};
52+
const fuses: Record<string, Fuse<DashboardItem, any>> = {};
5353
const weights: Record<string, number> = {};
5454

5555
for (const { name, threshold, weight } of SEARCH_KEYS) {
5656
fuses[name] = new Fuse(items, {
5757
keys: [name],
58-
threshold: threshold,
58+
threshold,
5959
distance: 1000,
6060
});
6161
weights[name] = weight;
@@ -74,7 +74,7 @@ const mergeSearchResults = (
7474
for (const key of Object.keys(index.fuses)) {
7575
const fuse = index.fuses[key];
7676
for (const item of fuse.search(query)) {
77-
hits.push(item);
77+
hits.push(item as DashboardItem);
7878
}
7979
}
8080

packages/app/src/app/pages/Dashboard/Sidebar/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const Sidebar: React.FC<SidebarProps> = ({
8080

8181
const { ubbBeta } = useWorkspaceFeatureFlags();
8282
const { isPrimarySpace, isTeamAdmin } = useWorkspaceAuthorization();
83-
const { isFree, isPro } = useWorkspaceSubscription();
83+
const { isPro } = useWorkspaceSubscription();
8484

8585
const showTemplates = state.activeTeam
8686
? state.sidebar[state.activeTeam]?.hasTemplates

0 commit comments

Comments
 (0)