Skip to content

Commit

Permalink
feat: 새로운 Task 추가 시 store 업데이트(#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoonncho committed Mar 2, 2023
1 parent 9a39a81 commit d414d5f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/Block/AddTaskButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { dayBlockAPI } from '@/api'
import Button from '@/components/Button'
import { AddIcon } from '@/components/Icons'
import useBlockListStore from '@/store/blocks'

const AddTaskButton = ({ blockId }: { blockId: number }) => {
const addNewTaskStore = useBlockListStore((state) => state.addNewTask)
const handleClick = () => {
addNewTaskStore(blockId)
dayBlockAPI.createTaskInBlock({
blockId,
content: '',
Expand Down

0 comments on commit d414d5f

Please sign in to comment.