From cf32d2b227f3eabeca388b540fbae795e7635570 Mon Sep 17 00:00:00 2001 From: "florian.jaeger" Date: Thu, 12 Sep 2024 11:42:05 +0200 Subject: [PATCH] fix: added staleTime to individual file status --- src/components/notebook/create-assignment/creation-switch.tsx | 2 +- src/components/notebook/manual-grading/grading-switch.tsx | 2 +- src/components/util/file-item.tsx | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/notebook/create-assignment/creation-switch.tsx b/src/components/notebook/create-assignment/creation-switch.tsx index 9118e49..e31b2c9 100644 --- a/src/components/notebook/create-assignment/creation-switch.tsx +++ b/src/components/notebook/create-assignment/creation-switch.tsx @@ -89,7 +89,7 @@ export class CreationModeSwitch extends React.Component { try { currentLayout.removeWidget(w); } catch(error: any) { - console.log("Could not remove widget: " + w) + console.log("Could not remove widget of cell: " + w.cell.id) console.log("Error: " + error) } diff --git a/src/components/notebook/manual-grading/grading-switch.tsx b/src/components/notebook/manual-grading/grading-switch.tsx index 867ca55..4b28459 100644 --- a/src/components/notebook/manual-grading/grading-switch.tsx +++ b/src/components/notebook/manual-grading/grading-switch.tsx @@ -163,7 +163,7 @@ export class GradingModeSwitch extends React.Component { try { currentLayout.removeWidget(w); } catch(error: any) { - console.log("Could not remove widget:" + w) + console.log("Could not remove widget of cell:" + w.cell.id) console.log("Error: " + error) } } diff --git a/src/components/util/file-item.tsx b/src/components/util/file-item.tsx index e724577..8fc0060 100644 --- a/src/components/util/file-item.tsx +++ b/src/components/util/file-item.tsx @@ -67,6 +67,7 @@ const FileItem = ({ true ) as Promise<'up_to_date' | 'push_needed' | 'divergent'>, enabled: !!lecture && !!assignment, + staleTime: 3000 }; const { data: fileRemoteStatus } = useQuery(fileStatusQueryOptions);