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", tenantIds: [2] }]}
publicKey={process.env.QUILL_API_KEY}
>
<CustomComponent />
</QuillProvider>
);
}
Make sure QuillProvider
is a parent of the component using the useExport
hook.
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.