Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
karamba228 committed Feb 7, 2025
1 parent 08c44d0 commit 9156f6a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
2 changes: 0 additions & 2 deletions src/components/Search/AutoCompleteOption.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// import { maturityColor, maturityIconPath } from "@/components/Maturity";
// import { riskColor, riskIconPath } from "@/components/Risk";
import { PackageResult } from "@/utils/search_packages";
import { ComboboxOption } from "@headlessui/react";
import { mdiSearchWeb } from "@mdi/js";
Expand Down
5 changes: 1 addition & 4 deletions src/utils/search_conda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ async function fetchCondaPackages(query: string): Promise<CondaApiPackage[]> {

return await response.json();
} catch (error) {
const errorMessage =
error instanceof Error ? error.message : "An unknown error occurred.";
toast.error(`Error fetching data from Anaconda.org: ${errorMessage}`);
throw new Error(`Error fetching data from Anaconda.org: ${errorMessage}`);
throw error;
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/utils/search_npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export default async function searchNpmPackages(
} catch (error) {
const errorMessage =
error instanceof Error ? error.message : "An unknown error occurred.";
toast.error(`Error fetching data from npm registry: ${errorMessage}`);
throw new Error(`Error fetching data from npm registry: ${errorMessage}`);
throw error;
}
}
2 changes: 1 addition & 1 deletion src/utils/search_pypi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function fetchPyPIProjects(): Promise<PyPIPackageResult[]> {
const errorMessage =
error instanceof Error ? error.message : "An unknown error occurred.";
toast.error(`Failed to fetch PyPI packages: ${errorMessage}`);
throw new Error(`Failed to fetch PyPI packages: ${errorMessage}`);
throw error;
}
}

Expand Down

0 comments on commit 9156f6a

Please sign in to comment.