Skip to content

Commit

Permalink
Put task status behind debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
arcticfly committed Mar 28, 2023
1 parent 1745019 commit 82dfaee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 0 additions & 5 deletions src/common/RunTaskButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Button, HStack, Icon, Spacer, Spinner } from '@chakra-ui/react';
import React from 'react';
import { useAppState } from '../state/store';
import { BsPlayFill, BsStopFill } from 'react-icons/bs';
import { debugMode } from '../constants';

export default function RunTaskButton(props: { runTask: () => void }) {
const state = useAppState((state) => ({
Expand Down Expand Up @@ -37,10 +36,6 @@ export default function RunTaskButton(props: { runTask: () => void }) {
return (
<HStack alignItems="center">
{button}
<Spacer />
{debugMode && state.taskState === 'running' && (
<Spinner color="blue.500" />
)}
</HStack>
);
}
3 changes: 2 additions & 1 deletion src/common/TaskUI.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { HStack, Spacer, Textarea, useToast } from '@chakra-ui/react';
import React, { useCallback } from 'react';
import { debugMode } from '../constants';
import { useAppState } from '../state/store';
import RunTaskButton from './RunTaskButton';
import TaskHistory from './TaskHistory';
Expand Down Expand Up @@ -56,7 +57,7 @@ const TaskUI = () => {
<HStack>
<RunTaskButton runTask={runTask} />
<Spacer />
<TaskStatus />
{debugMode && <TaskStatus />}
</HStack>
<TaskHistory />
{/* <PageContext /> */}
Expand Down

0 comments on commit 82dfaee

Please sign in to comment.