Skip to content

Commit

Permalink
Add edit button in home page
Browse files Browse the repository at this point in the history
  • Loading branch information
leung018 committed Jun 10, 2024
1 parent c9d88db commit bd21e1e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/app/components/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,14 @@ function HomePage({
>
Take Quiz
</button>
{
// TODO: Add Edit feature. (See the git blame of this line to see the original edit button code)
}
<button
className="ml-2 px-4 py-2 bg-green-500 text-white rounded hover:bg-green-700 transition-colors"
onClick={() => {
router.push(`/edit?id=${set.id}`)
}}
>
Edit
</button>
</div>
</div>
</li>
Expand Down

0 comments on commit bd21e1e

Please sign in to comment.