'use client'; import { useMemo } from "react"; import { CodePreview } from "./codePreview"; import { SearchResultFile, SearchResultFileMatch } from "@/lib/types"; interface FileMatchProps { match: SearchResultFileMatch; file: SearchResultFile; onOpen: () => void; } export const FileMatch = ({ match, file, onOpen, }: FileMatchProps) => { const content = useMemo(() => { return atob(match.Content); }, [match.Content]); // If it's just the title, don't show a code preview if (match.FileName) { return null; } return (