Skip to content

Commit 6f46f45

Browse files
authored
Merge pull request #120 from ASAP-Lettering/design/#117
[Design] 홈 버튼 변경 및 편지지 디자인 추가
2 parents 54e0b1f + 94e4feb commit 6f46f45

File tree

15 files changed

+302
-236
lines changed

15 files changed

+302
-236
lines changed
166 KB
Loading
173 KB
Loading
142 KB
Loading
4.22 KB
Loading

src/app/letter/preview/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ const LetterPreviewPage = () => {
8686
return (
8787
<Layout>
8888
<NavigatorBar
89-
title={letterId ? "편지 수정하기" : " 편지 등록하기"}
89+
title={letterId ? "편지 수정하기" : "받은 편지 보관하기"}
9090
cancel={false}
9191
/>
9292
<Container>

src/app/letter/register/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,13 @@ const LetterRegisterPage = () => {
186186
return (
187187
<Layout>
188188
<NavigatorBar
189-
title={letterId ? "편지 수정하기" : " 편지 등록하기"}
189+
title={letterId ? "편지 수정하기" : "받은 편지 보관하기"}
190190
cancel={false}
191191
/>
192192
<Container>
193193
<Essential>* 필수</Essential>
194194
<Column>
195-
<Label>편지를 보낸 사람은 누구인가요? *</Label>
195+
<Label>나에게 편지를 보낸 사람은 누구인가요? *</Label>
196196
<Input
197197
inputType="boxText"
198198
value={sender}

src/app/letter/template/page.tsx

Lines changed: 12 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ import { theme } from "@/styles/theme";
66
import NavigatorBar from "@/components/common/NavigatorBar";
77
import Button from "@/components/common/Button";
88
import { useRouter, useSearchParams } from "next/navigation";
9-
import Image from "next/image";
109
import Letter from "@/components/letter/Letter";
1110
import { useRecoilValue, useSetRecoilState } from "recoil";
1211
import {
1312
registerLetterState,
1413
useSsrComplectedState,
1514
} from "@/recoil/letterStore";
1615
import Loader, { LoaderContainer } from "@/components/common/Loader";
16+
import LetterTemplateList from "@/components/letter/LetterTemplateList";
17+
import { ALL_TEMPLATES } from "@/constants/templates";
1718

1819
const LetterTemplatePage = () => {
1920
const router = useRouter();
@@ -24,7 +25,9 @@ const LetterTemplatePage = () => {
2425
useRecoilValue(registerLetterState);
2526
const setRegisterLetterState = useSetRecoilState(registerLetterState);
2627

27-
const [template, setTemplateType] = useState<number>(templateType || 0);
28+
const [template, setTemplateType] = useState<number>(
29+
templateType || ALL_TEMPLATES[0]
30+
);
2831
const totalPage = 10;
2932

3033
/* SSR 완료 시 상태 업데이트 */
@@ -58,14 +61,14 @@ const LetterTemplatePage = () => {
5861
return (
5962
<Layout>
6063
<NavigatorBar
61-
title={letterId ? "편지 수정하기" : " 편지 등록하기"}
64+
title={letterId ? "편지 수정하기" : "받은 편지 보관하기"}
6265
cancel={false}
6366
/>
6467
<Container>
6568
<Essential>* 필수</Essential>
6669
<Column>
6770
<Label>편지지를 골라볼까요? *</Label>
68-
<SmallText>마음에 드는 배경으로 편지를 저장할 수 있어요</SmallText>
71+
<SmallText>마음에 드는 배경으로 편지를 보관할 수 있어요</SmallText>
6972
<LetterWrapper>
7073
<LetterContainer>
7174
<Letter
@@ -82,22 +85,11 @@ const LetterTemplatePage = () => {
8285
/>
8386
</LetterContainer>
8487
</LetterWrapper>
85-
<TemplatesList>
86-
{[0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((item) => (
87-
<TemplateImage
88-
key={item}
89-
src={`/assets/letter/background_${item}.png`}
90-
width={70}
91-
height={70}
92-
alt="편지지"
93-
$selected={template === item}
94-
onClick={() => hanleChangeTemplate(item)}
95-
/>
96-
))}
97-
</TemplatesList>
98-
<Page>
99-
<Current>{template + 1}</Current>/{totalPage}
100-
</Page>
88+
<LetterTemplateList
89+
selectedTemplate={template}
90+
onChangeTemplate={hanleChangeTemplate}
91+
templates={ALL_TEMPLATES}
92+
/>
10193
</Column>
10294
<ButtonWrapper>
10395
<Button
@@ -241,87 +233,6 @@ const LetterContainer = styled.div`
241233
min-height: 182px;
242234
}
243235
`;
244-
245-
const TemplatesList = styled.div`
246-
display: flex;
247-
justify-content: flex-start;
248-
align-items: center;
249-
gap: 12px;
250-
height: 78px;
251-
padding-left: 4px;
252-
margin-top: 69px;
253-
margin-bottom: 14px;
254-
overflow-x: scroll;
255-
256-
::-webkit-scrollbar {
257-
display: none;
258-
}
259-
-ms-overflow-style: none; /* IE, Edge */
260-
scrollbar-width: none; /* Firefox */
261-
262-
@media (max-height: 740px) {
263-
margin-top: 30px;
264-
margin-bottom: 5px;
265-
${theme.fonts.body14};
266-
gap: 11px;
267-
}
268-
269-
@media (max-height: 680px) {
270-
margin-top: 15px;
271-
margin-bottom: 5px;
272-
${theme.fonts.body14};
273-
gap: 11px;
274-
}
275-
276-
@media (max-height: 628px) {
277-
margin-top: 12px;
278-
margin-bottom: 5px;
279-
${theme.fonts.body14};
280-
gap: 11px;
281-
}
282-
`;
283-
284-
const TemplateImage = styled(Image)<{ $selected: boolean }>`
285-
width: 70px;
286-
height: 70px;
287-
border-radius: 8px;
288-
box-sizing: content-box;
289-
290-
${({ $selected, theme }) =>
291-
$selected &&
292-
css`
293-
box-shadow: 0 0 0 4px ${theme.colors.sub03};
294-
`}
295-
296-
@media (max-height: 628px) {
297-
width: 50px;
298-
height: 50px;
299-
border-radius: 4px;
300-
${({ $selected, theme }) =>
301-
$selected &&
302-
css`
303-
box-shadow: 0 0 0 2px ${theme.colors.sub03};
304-
`}
305-
}
306-
`;
307-
308-
const Page = styled.div`
309-
width: 100%;
310-
display: flex;
311-
justify-content: flex-end;
312-
color: ${theme.colors.gray500};
313-
${theme.fonts.caption03};
314-
`;
315-
316-
const Current = styled.span`
317-
color: ${theme.colors.white};
318-
margin-bottom: 100px;
319-
320-
@media (max-height: 628px) {
321-
margin-bottom: 50px;
322-
}
323-
`;
324-
325236
const ButtonWrapper = styled.div`
326237
width: 100%;
327238
position: absolute;

src/app/onboarding/page.tsx

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const Onboarding = () => {
7777
step === 1 ? "99px" : step === 2 ? "133px" : step === 3 ? "133px" : "",
7878
left:
7979
step === 1
80-
? "136px"
80+
? "132px"
8181
: step === 2
8282
? "105px"
8383
: step === 3
@@ -91,7 +91,7 @@ const Onboarding = () => {
9191
step === 1 ? "141px" : step === 2 ? "122px" : step === 3 ? "122px" : "",
9292
left:
9393
step === 1
94-
? "71px"
94+
? "68px"
9595
: step === 2
9696
? "159px"
9797
: step === 3
@@ -124,11 +124,15 @@ const Onboarding = () => {
124124
<TotalStep> / 4</TotalStep>
125125
</OverlayClose>
126126
{step === 1 && (
127-
<OverlayBtnWrapper left="24px" bottom="28px" width="65%">
127+
<OverlayBtnWrapper
128+
left="24px"
129+
bottom="28px"
130+
width="calc(100% - 167px)"
131+
>
128132
<Button
129133
buttonType="primary"
130134
size="large"
131-
text=" 편지 등록하기"
135+
text="받은 편지 보관하기"
132136
height="60px"
133137
/>
134138
</OverlayBtnWrapper>
@@ -166,25 +170,19 @@ const Onboarding = () => {
166170
src="/assets/onboarding/onboardingline5.svg"
167171
alt="Overlay Line 5"
168172
bottom="110px"
169-
left="85%"
173+
right="80px"
170174
/>
171-
<OverlayText bottom="149px" left="263px" textAlign="center">
175+
<OverlayText bottom="150px" right="30px" textAlign="center">
172176
{overlayTexts[4]}
173177
</OverlayText>
174178
<OverlayBtnWrapper right="24px" bottom="28px">
175179
<Button
176180
buttonType="secondary"
177181
size="large"
178-
width="100%"
182+
width="131px"
179183
height="60px"
180-
>
181-
<img
182-
src="/assets/icons/ic_rocket.svg"
183-
width={40}
184-
height={40}
185-
alt="rocket"
186-
/>
187-
</Button>
184+
text="편지 보내기"
185+
/>
188186
</OverlayBtnWrapper>
189187
</>
190188
)}

0 commit comments

Comments
 (0)