mirror of
https://github.com/Xevion/rdap.git
synced 2025-12-06 01:16:00 -06:00
Switch registryDataRef initial value type to match ref type
No fucking clue why I used a non-matching type for this; makes no sense
This commit is contained in:
@@ -25,9 +25,14 @@ import { Maybe, Result } from "true-myth";
|
||||
export type WarningHandler = (warning: { message: string }) => void;
|
||||
|
||||
const useLookup = (warningHandler?: WarningHandler) => {
|
||||
/**
|
||||
* A reference to the registry data, which is used to cache the registry data in memory.
|
||||
* This uses TargetType as the key, meaning v4/v6 IP/CIDR lookups are differentiated.
|
||||
*/
|
||||
const registryDataRef = useRef<Record<RootRegistryType, Register | null>>(
|
||||
{} as Record<TargetType, Register>
|
||||
{} as Record<RootRegistryType, Register>
|
||||
);
|
||||
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const [target, setTarget] = useState<string>("");
|
||||
// Used by a callback on LookupInput to forcibly set the type of the lookup.
|
||||
|
||||
Reference in New Issue
Block a user