'use client'; import { SearchResultFile, SearchResultChunk } from "@/features/search/types"; import { LightweightCodeHighlighter } from "@/app/[domain]/components/lightweightCodeHighlighter"; import Link from "next/link"; import { getBrowsePath } from "@/app/[domain]/browse/hooks/utils"; import { useDomain } from "@/hooks/useDomain"; interface FileMatchProps { match: SearchResultChunk; file: SearchResultFile; } export const FileMatch = ({ match, file, }: FileMatchProps) => { const domain = useDomain(); // If it's just the title, don't show a code preview if (match.matchRanges.length === 0) { return null; } return ( {match.content} ); }