diff --git a/README.md b/README.md index 8a514e5e412b6da96ac1cb3a2264142ba63d43d7..6f9cbd6a0bc4f8684cd39b8d567d6fe4b7ccd675 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,14 @@ + <!-- Copyright 2025 Zentrum fĆ¼r Digitale SouverƤnitƤt der Ć–ffentlichen Verwaltung (ZenDiS) GmbH. SPDX-License-Identifier: MIT --> -# Badge API Documentation \ No newline at end of file +## Development + +In case you want to run the "API Live Demo" against your local [Badge API](https://gitlab.opencode.de/open-code/badgebackend/badge-api) you can run the following command: + +```bash +npm i +NEXT_PUBLIC_API_BASE_URL=http://localhost:8080/api/v1 npm run dev +``` \ No newline at end of file diff --git a/src/components/ResultGrid.tsx b/src/components/ResultGrid.tsx index 595d2afddb7fa8e3bddc9186834353460d2505c4..e96d1567ca521838a5536d06be5381083f6f65e2 100644 --- a/src/components/ResultGrid.tsx +++ b/src/components/ResultGrid.tsx @@ -5,6 +5,7 @@ import Image from 'next/image' import { SarifApiResponse } from '../lib/apiClient' import { cn } from '../lib/utils' import ResultTable from './ResultTable' +import { config } from '../config' interface Props { currentScan: SarifApiResponse | null @@ -58,7 +59,12 @@ export default function ResultGrid({ currentScan }: Props) { !badge.badgeGranted && 'opacity-50', )} - src={badge.badgeUrl} + src={ + config.API_BASE_URL.replace( + '/api/v1', + '', + ) + badge.badgeUrl + } fill alt={badge.badgeId} />