Skip to content

Commit

Permalink
Merge pull request #118 from ujiro99/feature/task-time
Browse files Browse the repository at this point in the history
Feature/task time
  • Loading branch information
ujiro99 authored Jun 19, 2023
2 parents b4408d8 + 5c9d8f4 commit 96e13db
Show file tree
Hide file tree
Showing 13 changed files with 394 additions and 216 deletions.
6 changes: 3 additions & 3 deletions src/components/LineEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useTaskManager } from '@/hooks/useTaskManager'
import { useEditFinish } from '@/hooks/useEditable'
import { useAnalytics } from '@/hooks/useAnalytics'
import { eventStop } from '@/services/util'
import { DEFAULT, KEYCODE_ENTER } from '@/const'
import { TASK_DEFAULT, KEYCODE_ENTER } from '@/const'

import './LineEditor.css'

Expand All @@ -22,7 +22,7 @@ export function LineEditor(props: Props): JSX.Element {
const finishEdit = useEditFinish()

function finish() {
if (text !== DEFAULT) {
if (text !== TASK_DEFAULT) {
manager.setTextByLine(line, text)
} else {
manager.removeLine(line)
Expand All @@ -38,7 +38,7 @@ export function LineEditor(props: Props): JSX.Element {
function onFocus() {
let current = manager.getTextByLine(line)
if (!current) {
current = DEFAULT
current = TASK_DEFAULT
}
analytics.track('edit line start')
setText(current)
Expand Down
4 changes: 2 additions & 2 deletions src/components/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { QueryClient, QueryClientProvider } from 'react-query'
import SimpleBar from 'simplebar-react'

import { ErrorFallback } from '@/components/ErrorFallback'
import { TaskTextarea } from '@/components/TaskTextarea'
import { TodoEditor } from '@/components/TodoEditor'
import { useMode, MODE } from '@/hooks/useMode'
import { Menu } from '@/components/Menu/Menu'
import { EmptyLine } from '@/components/EmptyLine'
Expand Down Expand Up @@ -57,7 +57,7 @@ function TaskList() {
const [mode] = useMode()
switch (mode) {
case MODE.EDIT:
return <TaskTextarea />
return <TodoEditor />
case MODE.SHOW:
return <ToDo />
case MODE.REPORT:
Expand Down
191 changes: 0 additions & 191 deletions src/components/TaskTextarea.tsx

This file was deleted.

Loading

0 comments on commit 96e13db

Please sign in to comment.