From 50e960a86542565ae649ad1baea169ca3bad5a70 Mon Sep 17 00:00:00 2001 From: lydiacho <81505421+lydiacho@users.noreply.github.com> Date: Fri, 16 Aug 2024 02:02:07 +0900 Subject: [PATCH] =?UTF-8?q?[Design]=20Mobile=20ver.=20-=20ApplyPage,=20Rev?= =?UTF-8?q?iewPage=20=EA=B5=AC=ED=98=84=20(#401)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * cherry-pick: useDevice 기본인수 추가 및 Footer mobMax 설정 * chore: 임시 gitignore 수정 * design: ApplyHeader 반응형 * design: ApplyInfo 반응형 * design: BottomSection 반응형 * design: CommonSection 반응형 * design: DefaultSection 반응형 * design: ~Section container align center 추가 * "design: FileInput 반응형" " design: FileInput 반응형 * design: Info 반응형 * design: LinkInput 반응형 * chore: 임시 .gitignore 해제 * design: PartSection 반응형 및 section 공통 style 분리 * design: ApplyHeader 반응형 * fix: 테스트용 분기 수정 제거 * design: ApplyPage 전체 검토 * design: ReviewPage ApplyCategory top 추가 * fix: DEVICE_TYPE -> deviceType * fix: App.tsx import 에러 수정 --- .gitignore | 2 +- src/App.tsx | 2 +- src/common/components/Dialog/index.tsx | 4 +- .../components/ApplyCategory/index.tsx | 11 +- .../components/ApplyCategory/style.css.ts | 67 +++++++-- .../components/ApplyHeader/index.tsx | 8 +- .../components/ApplyHeader/style.css.ts | 41 ++++- .../ApplyPage/components/ApplyInfo/index.tsx | 39 ++--- .../components/ApplyInfo/style.css.ts | 135 +++++++++++++++-- .../components/BottomSection/index.tsx | 6 +- .../components/BottomSection/style.css.ts | 29 +++- .../components/CommonSection/index.tsx | 8 +- .../components/CommonSection/style.css.ts | 15 -- .../components/DefaultSection/index.tsx | 40 ++--- .../components/DefaultSection/style.css.ts | 141 +++++++++++++++--- .../ApplyPage/components/FileInput/index.tsx | 27 +++- .../components/FileInput/style.css.ts | 111 ++++++++++++-- src/views/ApplyPage/components/Info/index.tsx | 9 +- .../ApplyPage/components/Info/style.css.ts | 52 ++++++- .../ApplyPage/components/LinkInput/index.tsx | 13 +- .../components/LinkInput/style.css.ts | 64 ++++++-- .../components/PartSection/index.tsx | 8 +- .../components/PartSection/style.css.ts | 15 -- src/views/ApplyPage/index.tsx | 10 +- src/views/ApplyPage/style.css.ts | 74 ++++++++- src/views/ReviewPage/index.tsx | 6 +- src/views/dialogs/CompleteDialog/index.tsx | 8 +- src/views/dialogs/DraftDialog/index.tsx | 6 +- .../dialogs/ExistingApplicantDialog/index.tsx | 8 +- src/views/dialogs/ExitDialog/index.tsx | 12 +- .../dialogs/PreventApplyDialog/index.tsx | 6 +- .../dialogs/PreventReviewDialog/index.tsx | 8 +- .../dialogs/SessionExpiredDialog/index.tsx | 8 +- src/views/dialogs/SubmitDialog/index.tsx | 32 ++-- 34 files changed, 793 insertions(+), 232 deletions(-) delete mode 100644 src/views/ApplyPage/components/CommonSection/style.css.ts delete mode 100644 src/views/ApplyPage/components/PartSection/style.css.ts diff --git a/.gitignore b/.gitignore index 50c8dda2..3b0b4037 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,4 @@ dist-ssr *.sln *.sw? -.env +.env \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index 7af1e0ca..8739cd47 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -12,6 +12,7 @@ import Layout from '@components/Layout'; import { RecruitingInfoContext, RecruitingInfoType } from '@store/recruitingInfoContext'; import { ModeType, ThemeContext } from '@store/themeContext'; import { dark, light } from 'styles/theme.css'; +import { SessionExpiredDialog } from 'views/dialogs'; import ErrorPage from 'views/ErrorPage'; import MainPage from 'views/MainPage'; import PasswordPage from 'views/PasswordPage'; @@ -20,7 +21,6 @@ import ReviewPage from 'views/ReviewPage'; import SignupPage from 'views/SignupPage'; import 'styles/reset.css'; -import { SessionExpiredDialog } from 'views/dialogs'; const router = createBrowserRouter([ { diff --git a/src/common/components/Dialog/index.tsx b/src/common/components/Dialog/index.tsx index 8a95eaa9..492183a5 100644 --- a/src/common/components/Dialog/index.tsx +++ b/src/common/components/Dialog/index.tsx @@ -10,10 +10,10 @@ interface DialogProps extends DialogHTMLAttributes { } const Dialog = forwardRef(({ children, ...dialogElementProps }: DialogProps, ref) => { - const DEVICE_TYPE = useDevice(); + const deviceType = useDevice(); return createPortal( - + {children} , document.getElementById('modal')!, diff --git a/src/views/ApplyPage/components/ApplyCategory/index.tsx b/src/views/ApplyPage/components/ApplyCategory/index.tsx index 3e070609..1da8d9b5 100644 --- a/src/views/ApplyPage/components/ApplyCategory/index.tsx +++ b/src/views/ApplyPage/components/ApplyCategory/index.tsx @@ -1,24 +1,29 @@ import { memo } from 'react'; import { Link } from 'react-router-dom'; +import { useDevice } from '@hooks/useDevice'; import useScrollPosition from '@hooks/useScrollPosition'; import { CATEGORY } from './constant'; -import { activeLinkStyle, categoryLinkStyle, categoryList, container } from './style.css'; +import { activeLinkStyleVar, categoryLinkStyleVar, categoryList, container, containerVar } from './style.css'; interface ApplyCategoryProps { isReview: boolean; minIndex: number; } const ApplyCategory = memo(({ isReview, minIndex }: ApplyCategoryProps) => { + const deviceType = useDevice(); const { isScrollingDown, isScrollTop } = useScrollPosition(isReview ? 380 : 950); return ( - diff --git a/src/views/dialogs/ExistingApplicantDialog/index.tsx b/src/views/dialogs/ExistingApplicantDialog/index.tsx index 683e72a6..0ef54018 100644 --- a/src/views/dialogs/ExistingApplicantDialog/index.tsx +++ b/src/views/dialogs/ExistingApplicantDialog/index.tsx @@ -7,13 +7,13 @@ import { useDevice } from '@hooks/useDevice'; import { buttonInside, buttonOutside, buttonOutsideVar, buttonWrapperVar, mainTextVar } from '../style.css'; const ExistingApplicantDialog = forwardRef((_, ref) => { - const DEVICE_TYPE = useDevice(); + const deviceType = useDevice(); return ( -

이미 가입된 계정이 있어요.

-
-
+

이미 가입된 계정이 있어요.

+
+
diff --git a/src/views/dialogs/ExitDialog/index.tsx b/src/views/dialogs/ExitDialog/index.tsx index 06f0686d..a7701048 100644 --- a/src/views/dialogs/ExitDialog/index.tsx +++ b/src/views/dialogs/ExitDialog/index.tsx @@ -6,17 +6,17 @@ import { useDevice } from '@hooks/useDevice'; import { buttonInside, buttonOutside, buttonOutsideVar, buttonWrapperVar, mainTextVar, subTextVar } from '../style.css'; const ExitDialog = forwardRef((_, ref) => { - const DEVICE_TYPE = useDevice(); + const deviceType = useDevice(); return ( -

이대로 나가시겠어요?

-

변경사항이 있는 경우 임시저장을 해주세요.

-
-
+

이대로 나가시겠어요?

+

변경사항이 있는 경우 임시저장을 해주세요.

+
+ -
+
diff --git a/src/views/dialogs/PreventApplyDialog/index.tsx b/src/views/dialogs/PreventApplyDialog/index.tsx index 86776693..268400ee 100644 --- a/src/views/dialogs/PreventApplyDialog/index.tsx +++ b/src/views/dialogs/PreventApplyDialog/index.tsx @@ -6,7 +6,7 @@ import { useDevice } from '@hooks/useDevice'; import { buttonInside, buttonOutside, buttonOutsideVar, buttonWrapperVar, mainTextVar } from '../style.css'; const PreventApplyDialog = forwardRef((_, ref) => { - const DEVICE_TYPE = useDevice(); + const deviceType = useDevice(); const handlePreventESCKeyPress = (e: KeyboardEvent) => { if (e.key === 'Escape') e.preventDefault(); @@ -14,10 +14,10 @@ const PreventApplyDialog = forwardRef((_, ref) => { return ( -

지원서 제출 기한이 지났어요.

+

지원서 제출 기한이 지났어요.

+ className={`${buttonWrapperVar[deviceType]} ${buttonOutside.solid} ${buttonOutsideVar[deviceType]}`}>
diff --git a/src/views/dialogs/PreventReviewDialog/index.tsx b/src/views/dialogs/PreventReviewDialog/index.tsx index a0688f22..6a9fb416 100644 --- a/src/views/dialogs/PreventReviewDialog/index.tsx +++ b/src/views/dialogs/PreventReviewDialog/index.tsx @@ -7,7 +7,7 @@ import { useDevice } from '@hooks/useDevice'; import { buttonInside, buttonOutside, buttonOutsideVar, buttonWrapperVar, mainTextVar, subTextVar } from '../style.css'; const PreventReviewDialog = forwardRef((_, ref) => { - const DEVICE_TYPE = useDevice(); + const deviceType = useDevice(); const handlePreventESCKeyPress = (e: KeyboardEvent) => { if (e.key === 'Escape') e.preventDefault(); @@ -15,11 +15,11 @@ const PreventReviewDialog = forwardRef((_, ref) => { return ( -

지원서 제출을 먼저 해주세요.

-

'지원서' 페이지로 이동할게요.

+

지원서 제출을 먼저 해주세요.

+

'지원서' 페이지로 이동할게요.

+ className={`${buttonWrapperVar[deviceType]} ${buttonOutside.solid} ${buttonOutsideVar[deviceType]}`}> 확인 diff --git a/src/views/dialogs/SessionExpiredDialog/index.tsx b/src/views/dialogs/SessionExpiredDialog/index.tsx index 98bd8c8b..4cb1bb3f 100644 --- a/src/views/dialogs/SessionExpiredDialog/index.tsx +++ b/src/views/dialogs/SessionExpiredDialog/index.tsx @@ -7,7 +7,7 @@ import { useDevice } from '@hooks/useDevice'; import { buttonInside, buttonOutside, buttonOutsideVar, buttonWrapperVar, mainTextVar, subTextVar } from '../style.css'; const SessionExpiredDialog = forwardRef((_, ref) => { - const DEVICE_TYPE = useDevice(); + const deviceType = useDevice(); const handlePreventESCKeyPress = (e: KeyboardEvent) => { if (e.key === 'Escape') e.preventDefault(); @@ -26,11 +26,11 @@ const SessionExpiredDialog = forwardRef((_, ref) => { return ( -

로그인을 다시 해주세요.

-

세션이 만료되었거나 비정상적인 로그인이에요.

+

로그인을 다시 해주세요.

+

세션이 만료되었거나 비정상적인 로그인이에요.

+ className={`${buttonWrapperVar[deviceType]} ${buttonOutside.solid} ${buttonOutsideVar[deviceType]}`}> diff --git a/src/views/dialogs/SubmitDialog/index.tsx b/src/views/dialogs/SubmitDialog/index.tsx index 9d5b8f20..3dfe58f1 100644 --- a/src/views/dialogs/SubmitDialog/index.tsx +++ b/src/views/dialogs/SubmitDialog/index.tsx @@ -18,18 +18,18 @@ import { import { buttonInside, buttonOutside, buttonOutsideVar, buttonWrapperVar, mainTextVar, subTextVar } from '../style.css'; const MyInfoItem = ({ - DEVICE_TYPE, + deviceType, label, value, }: { - DEVICE_TYPE: 'MOB' | 'TAB' | 'DESK'; + deviceType: 'MOB' | 'TAB' | 'DESK'; label: string; value: string; }) => { return ( -
  • - - {value} +
  • + + {value}
  • ); }; @@ -49,7 +49,7 @@ const SubmitDialog = forwardRef( ({ userInfo: { name, email, phone, part }, dataIsPending, onSendData }, ref) => { const [isChecked, setIsChecked] = useState(false); - const DEVICE_TYPE = useDevice(); + const deviceType = useDevice(); const handleCheck = (e: ChangeEvent) => { setIsChecked(e.target.checked); @@ -57,13 +57,13 @@ const SubmitDialog = forwardRef( return ( -

    이대로 제출하시겠어요?

    -

    제출 완료하신 지원서는 수정하실 수 없어요.

    -
      - - - - +

      이대로 제출하시겠어요?

      +

      제출 완료하신 지원서는 수정하실 수 없어요.

      +
        + + + +
      -
      +
      setIsChecked(false)}> -
      +