diff --git a/src/components/ImgContentCut.tsx b/src/components/ImgContentCut.tsx index e525ca7..c17c0b6 100644 --- a/src/components/ImgContentCut.tsx +++ b/src/components/ImgContentCut.tsx @@ -8,19 +8,20 @@ import * as style from "@/styles/choiceCard/ImgContentCut"; import { CropperContainer } from "@/styles/choiceCard/ChoiceCardStyle"; const ImgContentCut: React.FC = () => { - const location = useLocation(); const navigate = useNavigate(); const cropperRef = useRef(null); const image = location.state?.image || ""; // 선택된 이미지 가져오기 + // Cropper.js의 초기 상태로 리셋 const handleReset = () => { if (cropperRef.current) { const cropper = (cropperRef.current as any).cropper; - cropper.reset(); // Cropper.js의 초기 상태로 리셋 + cropper.reset(); } }; + // 자른 이미지 저장 후 이동 const handleNext = () => { if (cropperRef.current) { const cropper = (cropperRef.current as any).cropper; @@ -30,14 +31,19 @@ const ImgContentCut: React.FC = () => { navigate("/choicecard"); } }; - return ( <> - navigate("/choicecard")} onFrontClick={handleReset} /> - - - navigate("/choicecard")} + onFrontClick={handleReset} + /> + + + { scalable={true} // 이미지 비율 변경 가능 cropBoxResizable={true} // 크롭 박스 크기 조정 가능 background={false} // 배경 제거 - /> + aria-label="이미지 자르기 도구" + /> - - + + ); diff --git a/src/components/choiceCard/Modal.tsx b/src/components/choiceCard/Modal.tsx index 13d8484..587a9a1 100644 --- a/src/components/choiceCard/Modal.tsx +++ b/src/components/choiceCard/Modal.tsx @@ -8,10 +8,10 @@ interface ModalProps { const Modal: React.FC = ({ onClose }) => { return ( - + 로그인 후 사진을 추가할 수 있어요! - + ); diff --git a/src/components/choiceCard/Rectangle.tsx b/src/components/choiceCard/Rectangle.tsx index 78a3b04..52aa548 100644 --- a/src/components/choiceCard/Rectangle.tsx +++ b/src/components/choiceCard/Rectangle.tsx @@ -4,19 +4,19 @@ import * as style from '@/styles/choiceCard/RectangleStyle'; type RectangleProps = { toggled: boolean; onClick: () => void; - children?: React.ReactNode; // children 속성 추가 + children?: React.ReactNode; }; const Rectangle: React.FC = ({ toggled, onClick, children }) => { return toggled ? ( - + {children} ) : ( - + {children} ); }; -export default Rectangle; +export default Rectangle; \ No newline at end of file diff --git a/src/components/choiceCard/Wrap.tsx b/src/components/choiceCard/Wrap.tsx index 15d3196..9aa7bb4 100644 --- a/src/components/choiceCard/Wrap.tsx +++ b/src/components/choiceCard/Wrap.tsx @@ -15,9 +15,9 @@ const Wrap: React.FC = ({ Title, SubText, WrapBool }) => { const navigate = useNavigate(); return ( - - { Title } - + + { Title } + {lines.map((line, index) => { if (line.includes(targetWord)) { const parts = line.split(targetWord); @@ -31,7 +31,7 @@ const Wrap: React.FC = ({ Title, SubText, WrapBool }) => { })} {WrapBool ? (
- navigate('/choicecard')} /> + navigate('/choicecard')} aria-label='초대장 만들기 페이지로 이동' />
) : null}
diff --git a/src/components/login/FeatureBoxEmpty.tsx b/src/components/login/FeatureBoxEmpty.tsx index 2d7a654..ff389c4 100644 --- a/src/components/login/FeatureBoxEmpty.tsx +++ b/src/components/login/FeatureBoxEmpty.tsx @@ -5,30 +5,27 @@ interface FeatureBoxEmptyProps { title: string; } -const FeatureBoxEmpty: React.FC = ({title}) => { - +const FeatureBoxEmpty: React.FC = ({ title }) => { switch (title) { case "Rectangle1": - return ; + return