Skip to content

Commit

Permalink
Removed Axios
Browse files Browse the repository at this point in the history
Removed Axios and moved sbom.json files to the Licenses directory.
  • Loading branch information
tellmeY18 committed Oct 10, 2024
1 parent bc1a589 commit 4a53047
Show file tree
Hide file tree
Showing 3 changed files with 92,452 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/Components/Licenses/SBOMViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import React, { useState, useEffect } from "react";
import Card from "../../CAREUI/display/Card";
import dayjs from "dayjs";
import { CopyToClipboard } from "react-copy-to-clipboard";
import axios from "axios";
import licenseUrls from "./licenseUrls.json";
import bomData from "./fe-sbom.json";
import beBomData from "./be-sbom.json";

const getLicenseUrl = (licenseId: string | undefined): string | null => {
if (!licenseId) return null;
Expand Down Expand Up @@ -67,15 +68,8 @@ const BOMDisplay: React.FC = () => {
const [activeTab, setActiveTab] = useState<string>("bom");

useEffect(() => {
axios
.get("/bom.json")
.then((response) => setBOM(response.data))
.catch((error) => console.error("Error fetching BOM:", error));

axios
.get("/be-sbom.json")
.then((response) => setBeBOM(response.data))
.catch((error) => console.error("Error fetching BE SBOM:", error));
setBOM(bomData as CycloneDXBOM);
setBeBOM(beBomData as CycloneDXBOM);
}, []);

const handleCopy = () => {
Expand Down
Loading

0 comments on commit 4a53047

Please sign in to comment.