mirror of
https://github.com/jakejarvis/hoot.git
synced 2025-10-18 22:34:25 -04:00
Refactor domain components and hooks for improved organization and functionality
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import type { Metadata } from "next";
|
||||
import { notFound, redirect } from "next/navigation";
|
||||
import { Suspense } from "react";
|
||||
import { DomainSsrAnalytics } from "@/components/analytics/domain-ssr-analytics";
|
||||
import { DomainReportFallback } from "@/components/domain/domain-report-fallback";
|
||||
import { DomainReportView } from "@/components/domain/domain-report-view";
|
||||
import { DomainSsrAnalytics } from "@/components/domain/domain-ssr-analytics";
|
||||
import { normalizeDomainInput } from "@/lib/domain";
|
||||
import { toRegistrableDomain } from "@/lib/domain-server";
|
||||
import { prefetchWhois } from "@/server/prefetch/domain";
|
||||
|
@@ -5,18 +5,18 @@ import Link from "next/link";
|
||||
import { Accordion } from "@/components/ui/accordion";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { captureClient } from "@/lib/analytics/client";
|
||||
import { useDomainHistory } from "../../hooks/use-domain-history";
|
||||
import { useDomainQueries } from "../../hooks/use-domain-queries";
|
||||
import { useTtlPreferences } from "../../hooks/use-ttl-preferences";
|
||||
import { DomainLoadingState } from "./domain-loading-state";
|
||||
import { DomainUnregisteredState } from "./domain-unregistered-state";
|
||||
import { exportDomainData } from "./export-data";
|
||||
import { Favicon } from "./favicon";
|
||||
import { useDomainHistory } from "./hooks/use-domain-history";
|
||||
import { useDomainQueries } from "./hooks/use-domain-queries";
|
||||
import { useTtlPreferences } from "./hooks/use-ttl-preferences";
|
||||
import { CertificatesSection } from "./sections/certificates-section";
|
||||
import { DnsRecordsSection } from "./sections/dns-records-section";
|
||||
import { HeadersSection } from "./sections/headers-section";
|
||||
import { HostingEmailSection } from "./sections/hosting-email-section";
|
||||
import { RegistrationSection } from "./sections/registration-section";
|
||||
import { exportDomainData } from "./utils/export-data";
|
||||
|
||||
export function DomainReportView({
|
||||
domain,
|
||||
|
@@ -18,7 +18,7 @@ export function Favicon({
|
||||
}) {
|
||||
const trpc = useTRPC();
|
||||
const { data, isLoading } = useQuery(
|
||||
trpc.domain.faviconUrl.queryOptions(
|
||||
trpc.domain.favicon.queryOptions(
|
||||
{ domain },
|
||||
{
|
||||
staleTime: 30 * 60_000, // 30 minutes
|
||||
|
@@ -1,8 +1,8 @@
|
||||
"use client";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
import { useTruncation } from "../../hooks/use-truncation";
|
||||
import { CopyButton } from "./copy-button";
|
||||
import { useTruncation } from "./hooks/use-truncation";
|
||||
import { TruncatedValue } from "./truncated-value";
|
||||
|
||||
export function KeyValue({
|
||||
|
@@ -16,7 +16,7 @@ export const domainRouter = router({
|
||||
"Certificate fetch failed",
|
||||
),
|
||||
headers: createDomainProcedure(probeHeaders, "Header probe failed"),
|
||||
faviconUrl: createDomainProcedure(
|
||||
favicon: createDomainProcedure(
|
||||
getOrCreateFaviconBlobUrl,
|
||||
"Favicon fetch failed",
|
||||
),
|
||||
|
Reference in New Issue
Block a user