-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpage.tsx
More file actions
140 lines (126 loc) · 3.16 KB
/
page.tsx
File metadata and controls
140 lines (126 loc) · 3.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
'use client';
import Button from '@/components/common/Button';
import Loader, { LoaderContainer } from '@/components/common/Loader';
import NavigatorBar from '@/components/common/NavigatorBar';
import { useRouter, useSearchParams } from 'next/navigation';
import { Suspense } from 'react';
import styled from 'styled-components';
const Signup = () => {
const router = useRouter();
const searchParams = useSearchParams();
const url = searchParams.get('url');
const handleButtonClick = () => {
if (url) {
router.push(`/verify/letter?url=${url}`);
} else {
router.push('/onboarding');
}
};
return (
<Container>
<MainWrapper>
<NavigatorBar cancel={false} url="/login" />
<Header>
<HeaderTitle>
회원가입 완료!
<br /> 레터링에 오신 걸 환영해요
</HeaderTitle>
<HeaderSubTitle>
편지에 담긴 진심으로 나의 스페이스를 채워보세요!
</HeaderSubTitle>
</Header>
<ImageWrapper>
<Image src="/assets/signup/signup_image.png" />
</ImageWrapper>
</MainWrapper>
<Wrapper>
<Button
buttonType="primary"
text={url ? '나에게 온 편지 열기' : '나의 스페이스에 접속하기'}
onClick={handleButtonClick}
></Button>
</Wrapper>
</Container>
);
};
export default function SignupPaging() {
return (
<Suspense
fallback={
<LoaderContainer>
<Loader />
</LoaderContainer>
}
>
<Signup />
</Suspense>
);
}
const Container = styled.div`
color: white;
display: flex;
box-sizing: border-box;
width: 100%;
max-width: 393px;
height: 100%;
flex-direction: column;
justify-content: space-between;
background-image: url('/assets/signup/signup_bg.png');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
`;
const MainWrapper = styled.div`
display: flex;
flex-direction: column;
overflow-y: auto;
padding: 0 24px;
padding-top: 20px;
&::-webkit-scrollbar {
width: 5px; /* Width of the scrollbar */
}
&::-webkit-scrollbar-track {
background: ${(props: any) => props.theme.colors.gray800};
border-radius: 10px; /* Rounded corners */
}
&::-webkit-scrollbar-thumb {
background: ${(props: any) => props.theme.colors.gray600};
border-radius: 10px; /* Rounded corners */
}
`;
const ImageWrapper = styled.div`
display: flex;
width: 100%;
justify-content: center;
`;
const Header = styled.div`
display: flex;
box-sizing: border-box;
flex-direction: column;
padding-left: 10px;
`;
const HeaderTitle = styled.div`
width: 100%;
${(props) => props.theme.fonts.heading01};
margin-top: 2.5rem;
`;
const HeaderSubTitle = styled.div`
width: 100%;
${(props) => props.theme.fonts.regular16};
color: ${(props) => props.theme.colors.gray300};
padding-top: 10px;
`;
const Image = styled.img`
display: flex;
box-sizing: border-box;
margin-top: 20px;
width: 80%;
height: auto;
max-width: 520px;
max-height: 400px;
`;
const Wrapper = styled.div`
display: flex;
width: 100%;
padding: 24px;
`;