App.tsx
import { QuillProvider, useExport } from "@quillsql/react";

function CustomComponent() {
  // pass in any report created in the Quill BI Platform
  const { downloadCSV } = useExport(QUILL_ID);
  return <button onClick={downloadCSV}>Save</button>;
}

function App() {
  return (
    <QuillProvider
      tenants={[{ tenantField: "customer_id", tenantdIds: [2] }]}
      publicKey={process.env.QUILL_API_KEY}
    >
      <CustomComponent />
    </QuillProvider>
  );
}

Make sure QuillProvider is a parent of the component using the useExport hook.

reportId
string
required

The id of the report you created in the Quill BI Platform.

Don’t have an id yet? Learn how to create a report in the Quill BI Platform to get started.