mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-27 09:46:25 +02:00
refactor: update report routes and improve export handling
- Revised report routes to clarify functionality for read, export, and delete operations. - Enhanced the export process to run all blocking I/O in a thread executor, improving async performance. - Updated error handling in the report panel to provide clearer feedback on loading failures.
This commit is contained in:
parent
adeef35443
commit
a668219240
2 changed files with 27 additions and 23 deletions
|
|
@ -3,7 +3,6 @@
|
|||
import { useAtomValue, useSetAtom } from "jotai";
|
||||
import {
|
||||
ChevronDownIcon,
|
||||
FileTextIcon,
|
||||
XIcon,
|
||||
} from "lucide-react";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
|
|
@ -257,12 +256,9 @@ function ReportPanelContent({
|
|||
if (error || !reportContent) {
|
||||
return (
|
||||
<div className="flex flex-1 flex-col items-center justify-center gap-3 p-6 text-center">
|
||||
<div className="flex size-12 items-center justify-center rounded-full bg-muted">
|
||||
<FileTextIcon className="size-6 text-muted-foreground" />
|
||||
</div>
|
||||
<div>
|
||||
<p className="font-medium text-foreground">Failed to load report</p>
|
||||
<p className="text-sm text-muted-foreground mt-1">
|
||||
<p className="text-sm text-red-500 mt-1">
|
||||
{error || "An unknown error occurred"}
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue