[Client Portal] Fix Dashboard change url & first default corporate & table loading

This commit is contained in:
Muhammad Fajar
2024-01-12 01:41:38 +07:00
parent 46eda07625
commit e58290dbb7
7 changed files with 178 additions and 244 deletions

View File

@@ -288,7 +288,11 @@ export default function Table<T>({
{exportReport && exportReport.useExport ? (
<Grid item xs={12} lg={2} xl={2}>
<FormControl fullWidth>
<Button variant="contained" sx={{ p: 2 }} onClick={exportReport.handleExportReport}>
<Button
variant="contained"
sx={{ p: 2 }}
onClick={() => exportReport.handleExportReport}
>
<Download />
<Typography variant="inherit" sx={{ marginLeft: 1 }}>
Export
@@ -329,12 +333,18 @@ export default function Table<T>({
))}
</TableRow>
))
) : (
) : loadings.isLoading === false && rows && rows.length === 0 ? (
<TableRow>
<TableCell colSpan={6} align="center">
No Data Found
</TableCell>
</TableRow>
) : (
<TableRow>
<TableCell colSpan={6} align="center">
Loading . . .
</TableCell>
</TableRow>
)}
</TableBody>
{/* End Table Body */}