// npm install @perpetio/redline
// Mount <FeedbackLayer /> once at the app root.
// For the Next.js App Router, keep "use client" as the first statement.
"use client";

import { useEffect } from "react";
import Redline from "@perpetio/redline";

export default function FeedbackLayer({
  project = "my-react-app",
  accent = "#bd3426",
  theme = "auto",
}) {
  useEffect(() => {
    Redline.init({ project, accent, theme, spa: true });
    return () => Redline.destroy();
  }, [project, accent, theme]);

  return null;
}

// Usage in App.jsx or app/layout.jsx:
// <FeedbackLayer project="marketing-site" />
