mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-10-02 13:05:28 +02:00
Auth: Implement automatic session refresh logic to prevent 'JWT expired' errors. The app now handles token renewal in the background, allowing users to save changes without interruption.
This commit is contained in:
1 parent
e0484354b9
commit
f6ef573f3a
9 files changed
+249
-46
No files matched your search
@@ -10,10 +10,9 @@ interface HistoryViewProps {
|
||||
data: ExcelRow[];
|
||||
onRevert: (articleNo: string, oldData: ExcelRow, historyId?: number) => void;
|
||||
onEdit?: (rowIndex: number) => void;
|
||||
sessionToken?: string;
|
||||
}
|
||||
|
||||
export function HistoryView({ headers, data, onRevert, onEdit, sessionToken }: HistoryViewProps) {
|
||||
export function HistoryView({ headers, data, onRevert, onEdit }: HistoryViewProps) {
|
||||
const COLUMNS = useColumns();
|
||||
const [history, setHistory] = useState<HistoryEntry[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
@@ -26,7 +25,7 @@ export function HistoryView({ headers, data, onRevert, onEdit, sessionToken }: H
|
||||
|
||||
const loadHistory = async () => {
|
||||
setLoading(true);
|
||||
const data = await getHistory(sessionToken);
|
||||
const data = await getHistory();
|
||||
setHistory(data);
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user