Skip to content

Commit

Permalink
Added update prop to add-button and passed in setUpdate for rerendering
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterOu8 committed Oct 16, 2024
1 parent 7fad1f7 commit 395ea01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions blotztask-ui/src/app/task-list/components/add-button.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Button } from '@/components/ui/button';

export function AddTask() {
export function AddTask({update}) {
return (
<Button>
<Button onClick={update}>
Add Task
</Button>
);
Expand Down
2 changes: 1 addition & 1 deletion blotztask-ui/src/app/task-list/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function Page() {

return (
<div className="flex flex-col items-end mt-10 mr-10">
<AddTask />
<AddTask update={setUpdate}/>

<TaskTable tasks={taskList} />

Expand Down

0 comments on commit 395ea01

Please sign in to comment.