import { useQueryClient } from "@tanstack/react-query"; import { ArrowLeft } from "lucide-react"; import { DomainOverviewLoadingState } from "@/client/features/domain/components/DomainOverviewLoadingState"; import { DomainHistorySection } from "@/client/features/domain/components/DomainHistorySection"; import { DomainResultsCard } from "@/client/features/domain/components/DomainResultsCard"; import { DomainSearchCard } from "@/client/features/domain/components/DomainSearchCard"; import { StatCard } from "@/client/features/domain/components/StatCard"; import { useDomainOverviewController } from "@/client/features/domain/useDomainOverviewController"; import { formatMetric, getDefaultSortOrder, } from "@/client/features/domain/utils"; import type { DomainActiveTab, DomainFilterValues, DomainSortMode, SortOrder, } from "@/client/features/domain/types"; type Props = { projectId: string; searchState: { domain: string; subdomains: boolean; sort: DomainSortMode; order?: SortOrder; tab: DomainActiveTab; search: string; locationCode: number; page: number; pageSize: number; appliedFilters: DomainFilterValues; }; navigate: (args: { search: (prev: Record) => Record; replace: boolean; }) => void; onShowRecentSearches: () => void; }; export function DomainOverviewPage({ projectId, searchState, navigate, onShowRecentSearches, }: Props) { const queryClient = useQueryClient(); const state = useDomainOverviewController({ projectId, queryClient, navigate, searchState, }); return (

Domain Overview

Analyze any domain's SEO profile: traffic, keywords, and backlinks.

state.applySort(sort, getDefaultSortOrder(sort)) } onLocationChange={(locationCode) => state.applyLocationChange(locationCode) } /> {state.isLoading ? ( ) : state.overview === null ? (
) : ( <>
{!state.overview.hasData ? (
Not enough data for this domain yet. Try another domain or include subdomains.
) : null} )}
); }