diff --git a/frontend/src/components/common/Button/FloatingButton.tsx b/frontend/src/components/common/Button/FloatingButton.tsx index 0c6f714a..7a24c4d0 100644 --- a/frontend/src/components/common/Button/FloatingButton.tsx +++ b/frontend/src/components/common/Button/FloatingButton.tsx @@ -10,6 +10,7 @@ type Color = 'yellow' | 'green' | 'subGreen'; interface Props extends React.HTMLAttributes { children: React.ReactNode; + onClick: () => void; size?: Size; color?: Color; 'aria-label'?: string; @@ -17,6 +18,7 @@ interface Props extends React.HTMLAttributes { const FloatingButton = ({ children, + onClick, size = 'medium', color = 'yellow', 'aria-label': ariaLabel = 'add', @@ -24,7 +26,7 @@ const FloatingButton = ({ }: Props) => { return ( - + {children} diff --git a/frontend/src/pages/ChecklistListPage.tsx b/frontend/src/pages/ChecklistListPage.tsx index 2417d744..3babc0c0 100644 --- a/frontend/src/pages/ChecklistListPage.tsx +++ b/frontend/src/pages/ChecklistListPage.tsx @@ -1,6 +1,6 @@ import styled from '@emotion/styled'; import { useEffect, useState } from 'react'; -import { Link, useNavigate } from 'react-router-dom'; +import { useNavigate } from 'react-router-dom'; import { getChecklists } from '@/apis/checklist'; import { Plus } from '@/assets/assets'; @@ -46,6 +46,10 @@ const ChecklistListPage = () => { }); }; + const handleClickFloatingButton = () => { + navigate(ROUTE_PATH.checklistNew); + }; + return ( <>
체크리스트} /> @@ -61,11 +65,9 @@ const ChecklistListPage = () => { ))} - - - - - + + + );