forked from VinokurovVE/tests
Cleanup
This commit is contained in:
@ -1,18 +1,15 @@
|
||||
import { useEffect, useState } from "react"
|
||||
import { Box, Button, Typography } from "@mui/material"
|
||||
import { useState } from "react"
|
||||
import { Box, Button } from "@mui/material"
|
||||
import axiosInstance from "../http/axiosInstance"
|
||||
import { DataGrid } from "@mui/x-data-grid"
|
||||
|
||||
export default function Reports() {
|
||||
const [state, setState] = useState<any>(null)
|
||||
const [exportData, setExportData] = useState<any>(null)
|
||||
const [state, setState] = useState(null)
|
||||
|
||||
const fetch = async () => {
|
||||
await axiosInstance.get(`/info/reports/0?to_export=true`, {
|
||||
responseType: 'blob',
|
||||
}).then(response => {
|
||||
setExportData(response.data)
|
||||
|
||||
const url = window.URL.createObjectURL(response.data)
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
@ -71,7 +68,7 @@ export default function Reports() {
|
||||
disableRowSelectionOnClick
|
||||
|
||||
processRowUpdate={(updatedRow, originalRow) => {
|
||||
console.log(updatedRow)
|
||||
console.log(updatedRow, originalRow)
|
||||
return updatedRow
|
||||
}}
|
||||
|
||||
|
Reference in New Issue
Block a user