diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 806eed8..3d9a691 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -16,7 +16,7 @@ jobs: node-version: '20' cache: 'yarn' - run: yarn install --frozen-lockfile - - run: ROTO_API_HOST=https://rest.bgp-api.net ROUTINATOR_API_HOST=https://routinator.nlnetlabs.nl yarn build + - run: ROTO_API_HOST=https://example.org ROUTINATOR_API_HOST=https://routinator.nlnetlabs.nl yarn build - name: Deploy uses: cloudflare/wrangler-action@v3 with: diff --git a/src/components/prefix-check/SearchOptions.tsx b/src/components/prefix-check/SearchOptions.tsx index b136d8b..19b8f49 100644 --- a/src/components/prefix-check/SearchOptions.tsx +++ b/src/components/prefix-check/SearchOptions.tsx @@ -1,5 +1,6 @@ -import React, { JSX } from 'react'; +import React, { JSX, useContext } from 'react'; import Help from '../Help'; +import { StatusContext } from '../../hooks/useStatus'; export interface SearchOptionsProps { validatePrefix: boolean; @@ -18,9 +19,18 @@ export default function SearchOptions({ setAsnString, onSubmit, }: SearchOptionsProps): JSX.Element { + const { roto } = useContext(StatusContext); + + if (!roto) { + setValidatePrefix(false); + } + const disabled = validatePrefix ? '' : 'disabled'; return (
+ {!roto &&
+ The Roto API is unresponsive. Some features may not be available. +
}

ASN Lookup @@ -31,10 +41,11 @@ export default function SearchOptions({

-

+