Skip to content

Commit

Permalink
Merge pull request #91 from karrotmvp/feature/#84
Browse files Browse the repository at this point in the history
사파리 대응, 각종 조정
  • Loading branch information
jjunyjjuny committed Dec 3, 2021
2 parents ab2027f + ab26f18 commit 9ebbbf4
Show file tree
Hide file tree
Showing 15 changed files with 125 additions and 123 deletions.
5 changes: 4 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
/>
<meta name="theme-color" content="#000000" />
<meta
name="description"
Expand Down
3 changes: 2 additions & 1 deletion src/components/CustomScreenHelmet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ const leftButtonStyle = {
marginLeft: "2rem",
display: "flex",
alignItems: "center",
padding: "1rem",
};

const rightButtonStyle = {
marginRight: "2rem",
display: "flex",
alignItems: "center",
// transform: "translateX(-1rem)",
};

const CustomBack = () => {
Expand Down
54 changes: 0 additions & 54 deletions src/components/Loader/index.tsx

This file was deleted.

19 changes: 19 additions & 0 deletions src/components/LoaderScreen/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from "react";
import styled from "@emotion/styled";
import { Loader } from "@assets/icon";

export default function LoaderScreen() {
return (
<LoaderScreenWrapper>
<Loader width={70} height={70} fill="#FF7E36" />
</LoaderScreenWrapper>
);
}

const LoaderScreenWrapper = styled.div`
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
`;
9 changes: 8 additions & 1 deletion src/components/Modal/ModalInnerBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ export default function ModalInnerBox({
closeModal,
}: ModalInnerBoxProps) {
return (
<ModalInnerBoxWrapper innerMode={innerMode}>
<ModalInnerBoxWrapper
innerMode={innerMode}
onClick={(e: React.MouseEvent<HTMLDivElement, MouseEvent>) => {
if (e.currentTarget === e.target) {
closeModal();
}
}}
>
<div className="modal-inner">{children}</div>
</ModalInnerBoxWrapper>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/ToolTip/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const ToolTipWrapper = styled.div<{
.tooltip__box {
background: ${({ theme }) => theme.color.primary};
color: white;
padding: 1.2rem 1.4rem;
padding: 1rem 1.4rem;
border-radius: 0.8rem;
display: flex;
Expand Down
1 change: 1 addition & 0 deletions src/pages/ApplyForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export default function ApplyForm({ errandId }: WithParamsProps) {
<div className="section__content">
<input
type="number"
inputMode="decimal"
placeholder="숫자만 입력해 주세요."
onClick={() => {
CustomMixPanel.track(CustomMixPanel.eventName.clickInput, {
Expand Down
86 changes: 49 additions & 37 deletions src/pages/ErrandDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import Slider from "react-slick";
import CustomMixPanel from "@utils/mixpanel";
import { CopyToClipboard } from "react-copy-to-clipboard";
import { toast } from "@components/Toast/Index";
import LoaderScreen from "@components/LoaderScreen";

export default function ErrandDetail({ errandId }: WithParamsProps) {
const { isOpen, openModal, closeModal, innerMode } = useModal();
Expand Down Expand Up @@ -209,6 +210,7 @@ export default function ErrandDetail({ errandId }: WithParamsProps) {
{
text: (
<button
style={{ width: "100%" }}
onClick={() => {
closeModal();
moveToResume();
Expand Down Expand Up @@ -295,19 +297,26 @@ export default function ErrandDetail({ errandId }: WithParamsProps) {
title="상세페이지"
appendRight={
modalInfo ? (
<Meatballs
onClick={() => {
openModal("list");
<div
style={{
padding: "1rem 1.6rem 1rem 1rem",
}}
/>
>
<Meatballs
onClick={() => {
openModal("list");
}}
/>
</div>
) : (
""
)
}
/>
<ErrandDetailWrapper>
{status !== "loading" && data ? (
<>

{status !== "loading" && data ? (
<>
<ErrandDetailWrapper>
<div style={{ overflow: "hidden" }}>
<Slider
{...{
Expand All @@ -318,9 +327,7 @@ export default function ErrandDetail({ errandId }: WithParamsProps) {
}}
>
{data?.errand.images?.map((image) => (
<div className="errand-detail__image" key={image.id}>
<img src={image.url} alt="" />
</div>
<ImageItem key={image.id} imgUrl={image.url} />
))}
</Slider>
</div>
Expand Down Expand Up @@ -359,29 +366,29 @@ export default function ErrandDetail({ errandId }: WithParamsProps) {
</div>
<p>{data?.errand.detail}</p>
</div>
</>
) : (
<div></div>
)}
</ErrandDetailWrapper>
{isOpen && modalInfo && innerMode && (
<Modal {...{ closeModal, modalInfo, innerMode }} />
</ErrandDetailWrapper>
{isOpen && modalInfo && innerMode && (
<Modal {...{ closeModal, modalInfo, innerMode }} />
)}
<StickyFooter>
<Button
buttonType="contained"
size="small"
color="primary"
fullWidth
rounded
onClick={() => {
handleClickButton();
}}
disabled={buttonDisabled}
>
{buttonText}
</Button>
</StickyFooter>
</>
) : (
<LoaderScreen />
)}
<StickyFooter>
<Button
buttonType="contained"
size="small"
color="primary"
fullWidth
rounded
onClick={() => {
handleClickButton();
}}
disabled={buttonDisabled}
>
{buttonText}
</Button>
</StickyFooter>
</StickyPageWrpper>
);
}
Expand Down Expand Up @@ -458,9 +465,7 @@ const ErrandDetailWrapper = styled.div`
&__image {
width: 100%;
height: 0;
padding-bottom: 90%;
/* height: 30rem; */
overflow: hidden;
& > img {
Expand All @@ -477,9 +482,8 @@ const ErrandDetailWrapper = styled.div`
}
&__contents {
background: white;
padding: 2.2rem 0;
padding-bottom: 2.2rem;
${({ theme }) => theme.container}
transform: translateY(-2rem);
z-index: 10;
h2 {
${({ theme }) => theme.font("large", "bold")}
Expand All @@ -488,7 +492,8 @@ const ErrandDetailWrapper = styled.div`
display: flex;
align-items: center;
${({ theme }) => theme.font("large", "regular")}
margin: 2rem 0;
margin: 1rem 0;
& > div {
width: 3rem;
height: 3rem;
Expand Down Expand Up @@ -589,3 +594,10 @@ const renderPrivateData = (
const renderStatus = (color: string, detailStatus: string) => {
return <div className={`errand-detail__status ${color}`}>{detailStatus}</div>;
};

const ImageItem = styled.div<{ imgUrl: string }>`
width: 100%;
padding-bottom: 90%;
background: ${({ imgUrl }) => `url(${imgUrl})`};
background-size: cover;
`;
43 changes: 25 additions & 18 deletions src/pages/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ export default function Home() {
horizontalTail="right"
/>
)}
<button
<div
className="home__fixed__fab"
onClick={() => {
moveToErrandRequestForm();
CustomMixPanel.track(CustomMixPanel.eventName.clickETC, {
Expand All @@ -82,8 +83,10 @@ export default function Home() {
});
}}
>
<Plus stroke="white" />
</button>
<button>
<Plus stroke="white" />
</button>
</div>
</div>
</HomeWrapper>
</>
Expand All @@ -108,7 +111,7 @@ const HomeWrapper = styled.main`
.home {
&__top {
margin-top: 2rem;
margin-bottom: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
Expand Down Expand Up @@ -156,24 +159,27 @@ const HomeWrapper = styled.main`
&__list-wrapper {
position: relative;
height: 100%;
overflow: hidden;
/* height: 100%; */
/* overflow: hidden; */
}
&__fixed {
position: absolute;
bottom: 4rem;
right: 3rem;
bottom: 0;
right: 0;
z-index: 9999;
& > button {
width: 5.7rem;
height: 5.7rem;
background: ${({ theme }) => theme.color.primary};
border-radius: 3rem;
display: flex;
justify-content: center;
align-items: center;
&__fab {
padding: 1rem 3rem 3rem 1rem;
& > button {
width: 5.7rem;
height: 5.7rem;
background: ${({ theme }) => theme.color.primary};
border-radius: 3rem;
display: flex;
justify-content: center;
align-items: center;
}
}
}
}
Expand Down Expand Up @@ -214,8 +220,9 @@ export const AppenderWrapper = styled.div`
& > div {
display: flex;
align-items: center;
padding: 1rem;
}
& > div + div {
margin-left: 1.8rem;
margin-left: 0rem;
}
`;
2 changes: 1 addition & 1 deletion src/pages/RequestForm/ImageAppender/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default function ImageAppender({
}

const ImageAppenderWrapper = styled(BoxWrapper)`
border: 0.1rem solid ${({ theme }) => theme.color.grey6};
border: 0.12rem solid ${({ theme }) => theme.color.grey6};
width: 7rem;
height: 7rem;
& > label {
Expand Down
2 changes: 2 additions & 0 deletions src/pages/RequestForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export default function RequestForm({
className="price"
placeholder="심부름 금액을 입력해 주세요."
type="number"
inputMode="decimal"
onClick={() => {
CustomMixPanel.track(CustomMixPanel.eventName.clickInput, {
page: "요청하기",
Expand Down Expand Up @@ -267,6 +268,7 @@ export default function RequestForm({
<input
placeholder="전화번호를 입력하세요."
type="number"
inputMode="decimal"
onClick={() => {
CustomMixPanel.track(CustomMixPanel.eventName.clickInput, {
page: "요청하기",
Expand Down
Loading

0 comments on commit 9ebbbf4

Please sign in to comment.