From 06d5a04ceae94d31cac80e7afee38fc7dd012e32 Mon Sep 17 00:00:00 2001 From: imddoy Date: Tue, 20 Aug 2024 03:40:50 +0900 Subject: [PATCH 1/7] =?UTF-8?q?feat:=20=EC=83=81=EC=84=B8=20=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=20=EB=A1=9C=EC=A7=81=20=EA=B5=AC=ED=98=84=20?= =?UTF-8?q?=EB=B9=84=EB=8F=99=EA=B8=B0=EC=A0=81=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=EC=9D=84=20=EC=9D=BD=EC=96=B4=EC=99=80?= =?UTF-8?q?=EC=84=9C=20=EC=88=9C=EC=84=9C=EB=8C=80=EB=A1=9C=20=EB=AF=B8?= =?UTF-8?q?=EB=A6=AC=EB=B3=B4=EA=B8=B0=20=EA=B5=AC=ED=98=84=20max=EA=B0=92?= =?UTF-8?q?=EC=9D=B8=2010=EC=9D=84=20=EB=84=98=EA=B8=B0=EB=A9=B4=20?= =?UTF-8?q?=EC=9E=91=EC=97=85=20=EC=9D=B4=ED=96=89=EB=90=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EA=B3=A0=20=EC=95=88=EB=82=B4=ED=95=98=EA=B8=B0=20?= =?UTF-8?q?=EC=A0=95=ED=99=95=ED=95=9C=20=EC=86=8D=EC=84=B1=20=EC=9D=B4?= =?UTF-8?q?=EB=A6=84=EC=9D=80=20=EB=AA=85=EC=84=B8=EC=84=9C=20=EB=82=98?= =?UTF-8?q?=EC=98=A4=EB=A9=B4=20=EB=B3=80=EA=B2=BD=ED=95=A0=20=EC=98=88?= =?UTF-8?q?=EC=A0=95(=EA=B5=AC=EC=84=B1=EB=8F=84=20=EB=B3=80=EA=B2=BD=20?= =?UTF-8?q?=EC=98=88=EC=A0=95)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/register/Register.styled.ts | 20 ++++ src/pages/register/Register.tsx | 9 ++ src/pages/register/components/DetailImage.tsx | 110 ++++++++++++++++++ src/pages/register/typings/gigInfo.ts | 6 + src/pages/register/utils/handleEvent.ts | 13 ++- 5 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 src/pages/register/components/DetailImage.tsx diff --git a/src/pages/register/Register.styled.ts b/src/pages/register/Register.styled.ts index dd6c03d6..567cf16d 100644 --- a/src/pages/register/Register.styled.ts +++ b/src/pages/register/Register.styled.ts @@ -114,6 +114,25 @@ export const FileInputWrapper = styled.div` ${Generators.flexGenerator("row", "center", "start")} gap: 1.4rem; + overflow-x: scroll; + + &::-webkit-scrollbar { + display: none; + } +`; + +export const FilesInputWrapper = styled.div` + position: relative; + + ${Generators.flexGenerator("row", "center", "start")} + gap: 1.4rem; + width: calc(100% + 2.4rem); + padding-right: 2.4rem; + overflow-x: scroll; + + &::-webkit-scrollbar { + display: none; + } `; export const HiddenFileInput = styled.input` @@ -122,6 +141,7 @@ export const HiddenFileInput = styled.input` export const CustomFileInput = styled.label<{ width?: number; height?: number }>` ${Generators.flexGenerator()} + flex-shrink: 0; width: ${({ width }) => (width ? width : 10.8)}rem; height: ${({ height }) => (height ? height : 15.4)}rem; diff --git a/src/pages/register/Register.tsx b/src/pages/register/Register.tsx index 325fd233..2f263c12 100644 --- a/src/pages/register/Register.tsx +++ b/src/pages/register/Register.tsx @@ -40,6 +40,7 @@ import { handleChange, handleDateChange, handleGenreSelect, + handleImagesUpload, handleImageUpload, handleTotalTicketCountChange, isAllFieldsFilled, @@ -47,6 +48,7 @@ import { onMinusClick, onPlusClick, } from "./utils/handleEvent"; +import DetailImage from "./components/DetailImage"; const Register = () => { const { isLogin } = useLogin(); @@ -84,6 +86,7 @@ const Register = () => { accountNumber: "", // 계좌번호 accountHolder: "", // 예금주 posterImage: "", // 포스터 이미지 URL + detailImages: [], // 상세 이미지 URL performanceTeamName: "", // 공연 팀명 performanceVenue: "", // 공연 장소 performanceContact: "", // 대표자 연락처 @@ -123,6 +126,7 @@ const Register = () => { accountNumber, accountHolder, posterImage, + detailImages, performanceTeamName, performanceVenue, performancePeriod, @@ -364,6 +368,11 @@ const Register = () => { /> + handleImagesUpload(detailImage, setGigInfo)} + /> +