1
mirror of https://github.com/jakejarvis/hoot.git synced 2025-10-18 22:34:25 -04:00
Files
hoot/server/prefetch/domain.ts

14 lines
395 B
TypeScript

import "server-only";
import type { DomainRecord } from "rdapper";
import { cache } from "react";
import { createServerCaller } from "../caller";
export const prefetchRegistration = cache(
async (domain: string): Promise<DomainRecord> => {
const caller = await createServerCaller();
const registration = await caller.domain.registration({ domain });
return registration;
},
);