mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-08-03 17:35:23 +02:00
fix: always load history on mount and reload on data change
This commit is contained in:
@@ -22,6 +22,12 @@ export function HistoryView({ headers, data, onRevert, onEdit }: HistoryViewProp
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
loadHistory();
|
loadHistory();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (data.length > 0) {
|
||||||
|
loadHistory();
|
||||||
|
}
|
||||||
}, [data]);
|
}, [data]);
|
||||||
|
|
||||||
const loadHistory = async () => {
|
const loadHistory = async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user