revert (#1439)
This commit is contained in:
committed by
GitHub
parent
32c689dfc5
commit
89c0f1b0ef
@@ -25,10 +25,12 @@ const TaskAttemptPanel = ({
|
||||
}
|
||||
|
||||
return (
|
||||
<EntriesProvider>
|
||||
<EntriesProvider key={attempt.id}>
|
||||
<RetryUiProvider attemptId={attempt.id}>
|
||||
{children({
|
||||
logs: <VirtualizedList attempt={attempt} task={task} />,
|
||||
logs: (
|
||||
<VirtualizedList key={attempt.id} attempt={attempt} task={task} />
|
||||
),
|
||||
followUp: (
|
||||
<TaskFollowUpSection task={task} selectedAttemptId={attempt.id} />
|
||||
),
|
||||
|
||||
@@ -599,8 +599,14 @@ export function TaskFollowUpSection({
|
||||
refetchAttemptBranch,
|
||||
]);
|
||||
|
||||
if (!selectedAttemptId) {
|
||||
return null;
|
||||
if (!selectedAttemptId) return null;
|
||||
|
||||
if (isScratchLoading) {
|
||||
return (
|
||||
<div className="flex items-center justify-center h-full">
|
||||
<Loader2 className="animate-spin h-6 w-6" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -6,6 +6,5 @@ export function useTaskAttempt(attemptId?: string) {
|
||||
queryKey: ['taskAttempt', attemptId],
|
||||
queryFn: () => attemptsApi.get(attemptId!),
|
||||
enabled: !!attemptId,
|
||||
placeholderData: (previousData) => previousData,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ export function ProjectTasks() {
|
||||
}, [projectId, taskId, isLoading, selectedTask, navigate]);
|
||||
|
||||
const effectiveAttemptId = attemptId === 'latest' ? undefined : attemptId;
|
||||
const isTaskView = !!taskId && !effectiveAttemptId && attemptId !== 'latest';
|
||||
const isTaskView = !!taskId && !effectiveAttemptId;
|
||||
const { data: attempt } = useTaskAttempt(effectiveAttemptId);
|
||||
|
||||
const { data: branchStatus } = useBranchStatus(attempt?.id);
|
||||
|
||||
Reference in New Issue
Block a user