import { SquarePen } from "lucide-react"; import { isEditEnabled, getEditLink, getRepoUrl } from "../node/helpers"; export interface EditWithProps { filePath: string; text?: string; className?: string; } export default function EditWith({ filePath, text = "Edit this page", className = "", }: EditWithProps) { if (!isEditEnabled()) return null; const repoUrl = getRepoUrl(); if (!repoUrl) return null; const editUrl = getEditLink(repoUrl, filePath); return (
); }