From 1d5d5c6f15a6d7aee4af3a3d23d6e862cd09f8e7 Mon Sep 17 00:00:00 2001 From: KoolTheba Date: Sat, 28 Oct 2023 18:07:09 +0200 Subject: [PATCH 1/2] feat: added platform dinamically to commit links --- src/components/ProjectCompartor.tsx | 4 ++-- src/components/ProjectDetails.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/ProjectCompartor.tsx b/src/components/ProjectCompartor.tsx index 16e32ca..15f8d07 100644 --- a/src/components/ProjectCompartor.tsx +++ b/src/components/ProjectCompartor.tsx @@ -113,7 +113,7 @@ function ProjectComparator() {

Analysis of commits{" "} @@ -121,7 +121,7 @@ function ProjectComparator() { {" "} and{" "} diff --git a/src/components/ProjectDetails.tsx b/src/components/ProjectDetails.tsx index faa0a7f..2c6a09b 100644 --- a/src/components/ProjectDetails.tsx +++ b/src/components/ProjectDetails.tsx @@ -54,7 +54,7 @@ function ProjectDetails() {

Current commit{" "} From b4c64265c25ecb9796fea7d7f4a34ce6bb36f1a8 Mon Sep 17 00:00:00 2001 From: KoolTheba Date: Sat, 28 Oct 2023 18:08:47 +0200 Subject: [PATCH 2/2] feat: added condition to step sec and deps dev links --- src/components/ProjectDetails.tsx | 46 +++++++++++++++++-------------- src/constants/platforms.ts | 1 + 2 files changed, 27 insertions(+), 20 deletions(-) create mode 100644 src/constants/platforms.ts diff --git a/src/components/ProjectDetails.tsx b/src/components/ProjectDetails.tsx index 2c6a09b..07155a4 100644 --- a/src/components/ProjectDetails.tsx +++ b/src/components/ProjectDetails.tsx @@ -8,6 +8,7 @@ import Collapsible from "./Collapsable"; import Loading from "./Loading"; import { ScoreElement } from "../types"; +import { GITHUB } from "../constants/platforms"; import "../styles/ProjectDetails.css"; @@ -61,26 +62,31 @@ function ProjectDetails() { {`(${data.repo.commit.substring(0, 8)})`}

-

- Additional info at{" "} - - deps.dev - -

-

- Improve your scoring with{" "} - - StepSecurity - -

+ {platform === GITHUB && ( + <> +

+ Additional info at{" "} + + deps.dev + +

+

+ Improve your scoring with{" "} + + StepSecurity + +

+ + )} +
{data.checks.map((element: ScoreElement) => ( <> diff --git a/src/constants/platforms.ts b/src/constants/platforms.ts new file mode 100644 index 0000000..b54beda --- /dev/null +++ b/src/constants/platforms.ts @@ -0,0 +1 @@ +export const GITHUB = 'github.com' \ No newline at end of file