diff --git a/src/constants.ts b/src/constants.ts index 9d8ad18..c6cb5af 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,5 +1,5 @@ // see https://www.iana.org/assignments/rdap-json-values -import type {ExtendedUri, RdapStatusType, Uri} from "@/types"; +import type {ExtendedUri, RdapStatusType, ObjectType} from "@/types"; export const rdapStatusInfo: Record = { "validated": "Signifies that the data of the object instance has been found to be accurate. This type of status is usually found on entity object instances to note the validity of identifying contact information.", @@ -47,7 +47,7 @@ export const registryURLs: Record = { "https://data.iana.org/rdap/object-tags.json": "entity", }; -export const placeholders: Record = { +export const placeholders: Record = { 'ip': '192.168.0.1/16', 'autnum': '65535', 'entity': 'ABC123-EXAMPLE', diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 7da42cd..9a16fc9 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,6 +1,6 @@ import {type NextPage} from "next"; import Head from "next/head"; -import type {Uri} from "../types"; +import type {ObjectType} from "../types"; import {placeholders} from "../constants"; import {asnMatch, domainMatch, entityMatch, getBestURL, getRDAPURL, getType, ipMatch, showSpinner} from "../rdap"; import {useEffect, useState} from "react"; @@ -11,7 +11,7 @@ import update from "immutability-helper"; import GenericObject, {Link} from "../components/DomainType"; const Index: NextPage = () => { - const [uriType, setUriType] = useState('domain'); + const [uriType, setUriType] = useState('domain'); const [requestJSContact, setRequestJSContact] = useState(false); @@ -170,7 +170,7 @@ const Index: NextPage = () => { // Load parameters from URL query string on page load const params = new URLSearchParams(window.location.search); if (params.has('type')) - setUriType(params.get('type') as Uri); + setUriType(params.get('type') as ObjectType); else if (params.has('object')) setObject(params.get('object')!); @@ -250,7 +250,7 @@ const Index: NextPage = () => {