mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-08-03 14:55:24 +02:00
Fix save changes looping issue and authorize all Supabase API calls
This commit is contained in:
@@ -8,9 +8,10 @@ interface HistoryViewProps {
|
||||
headers: string[];
|
||||
data: ExcelRow[];
|
||||
onRevert: (articleNo: string, oldData: ExcelRow, historyId?: number) => void;
|
||||
sessionToken?: string;
|
||||
}
|
||||
|
||||
export function HistoryView({ headers, data, onRevert }: HistoryViewProps) {
|
||||
export function HistoryView({ headers, data, onRevert, sessionToken }: HistoryViewProps) {
|
||||
const [history, setHistory] = useState<HistoryEntry[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [expandedId, setExpandedId] = useState<string | null>(null);
|
||||
@@ -22,7 +23,7 @@ export function HistoryView({ headers, data, onRevert }: HistoryViewProps) {
|
||||
|
||||
const loadHistory = async () => {
|
||||
setLoading(true);
|
||||
const data = await getHistory();
|
||||
const data = await getHistory(sessionToken);
|
||||
setHistory(data);
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user