import { Entity } from "@backstage/catalog-model" ; import { useGitHubConfig } from "./useGitHubConfig" ; export const useUrl = ( entity ) => { const targetProviderConfig = useGitHubConfig ( entity ) ; const baseUrl = targetProviderConfig ?. getOptionalString ( 'apiBaseUrl' ) || 'https://api.github.com' ; const hostname = targetProviderConfig ?. getOptionalString ( 'host' ) || 'github.com' ; return { hostname , baseUrl , } ; } ;