File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,20 +57,16 @@ export default function Users() {
5757
5858 const onClick = async ( ) => {
5959 try {
60- // Fetch the CSV file as a Blob
6160 const blob = await downloadCSV ( ) ;
6261
63- // Create a download link
6462 const url = window . URL . createObjectURL ( blob . data as Blob ) ;
6563 const a = document . createElement ( 'a' ) ;
6664 a . href = url ;
6765 a . download = 'users.csv' ; // Set the filename for the downloaded file
6866 document . body . appendChild ( a ) ;
6967
70- // Trigger the download
7168 a . click ( ) ;
7269
73- // Clean up
7470 window . URL . revokeObjectURL ( url ) ;
7571 document . body . removeChild ( a ) ;
7672 } catch ( err ) {
@@ -82,7 +78,7 @@ export default function Users() {
8278 < div className = "p-4" >
8379 < div className = "mb-4" > </ div >
8480 { /* <DataTableUsers users={oosers} columns={userCol} /> */ }
85- < div className = "mb-4 flex flex-col items-start" >
81+ < div className = "mb-4 flex flex items-start" >
8682 < input
8783 className = "bg-gray w-[50%] rounded-md border p-2 text-white"
8884 placeholder = "Search"
You can’t perform that action at this time.
0 commit comments