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:
Christian Vidal Wolf committed 2026-04-23 12:37:04 +02:00
1 parent e0484354b9
commit f6ef573f3a
9 files changed
+249 -46

No files matched your search

+2 -3
View File
@@ -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);
};