Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
client-user
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
한성재
client-user
Commits
989c1386
Commit
989c1386
authored
1 year ago
by
한성재
Committed by
Minseo Lee
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
feat: signuppage add state
parent
c530e833
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/pages/cart-page/CartPage.tsx
+1
-1
1 addition, 1 deletion
src/pages/cart-page/CartPage.tsx
src/pages/signup-page/SignupPage.tsx
+43
-18
43 additions, 18 deletions
src/pages/signup-page/SignupPage.tsx
with
44 additions
and
19 deletions
src/pages/cart-page/CartPage.tsx
+
1
−
1
View file @
989c1386
...
...
@@ -93,7 +93,7 @@ const CartPage: FC<Props> = ({ connector }) => {
<
div
className
=
{
S
[
'
item-text
'
]
}
>
<
span
className
=
{
S
[
'
item-name
'
]
}
>
{
d
.
name
}
</
span
>
<
span
className
=
{
S
[
'
item-price
'
]
}
>
{
moneyFormatter
(
d
.
price
*
quantities
[
i
])
}
</
span
>
<
QuantityController
quantity
=
{
quantities
}
setQuantity
=
{
setQuantities
}
index
=
{
i
}
/>
<
QuantityController
quantity
=
{
quantities
[
i
]
}
setQuantity
=
{
setQuantities
}
index
=
{
i
}
/>
</
div
>
</
div
>
);
...
...
This diff is collapsed.
Click to expand it.
src/pages/signup-page/SignupPage.tsx
+
43
−
18
View file @
989c1386
...
...
@@ -21,13 +21,17 @@ interface Props {
const
SignupPage
:
React
.
FC
<
Props
>
=
({
connector
})
=>
{
const
navigate
=
useNavigate
();
const
[
password
,
setPassword
]
=
useState
<
passString
>
({
origin
:
''
,
again
:
''
const
[
acountData
,
setAcountData
]
=
useState
({
loginId
:
''
,
name
:
''
,
password
:
''
,
email
:
''
,
phone
:
''
});
const
[
passwordAgain
,
setPasswordAgain
]
=
useState
<
string
>
(
''
);
const
Correct
=
()
=>
{
const
empty
=
password
.
origin
===
''
;
const
same
=
password
.
origin
===
password
.
a
gain
;
const
empty
=
acountData
.
password
===
''
;
const
same
=
acountData
.
password
===
password
A
gain
;
if
(
empty
)
{
return
null
;
}
...
...
@@ -39,18 +43,38 @@ const SignupPage: React.FC<Props> = ({ connector }) => {
</
div
>
);
};
const
handleNameChange
=
(
event
:
React
.
ChangeEvent
<
HTMLInputElement
>
)
=>
{
setAcountData
((
prev
)
=>
({
...
prev
,
name
:
event
.
target
.
value
}));
};
const
handleIdChange
=
(
event
:
React
.
ChangeEvent
<
HTMLInputElement
>
)
=>
{
setAcountData
((
prev
)
=>
({
...
prev
,
loginId
:
event
.
target
.
value
}));
};
const
handleEmailChange
=
(
event
:
React
.
ChangeEvent
<
HTMLInputElement
>
)
=>
{
setAcountData
((
prev
)
=>
({
...
prev
,
email
:
event
.
target
.
value
}));
};
const
handlePhoneChange
=
(
event
:
React
.
ChangeEvent
<
HTMLInputElement
>
)
=>
{
setAcountData
((
prev
)
=>
({
...
prev
,
phone
:
event
.
target
.
value
}));
};
const
handlePasswordChange
=
(
event
:
React
.
ChangeEvent
<
HTMLInputElement
>
)
=>
{
set
Password
((
prev
Pass
)
=>
({
...
prev
Pass
,
origin
:
event
.
target
.
value
set
AcountData
((
prev
)
=>
({
...
prev
,
password
:
event
.
target
.
value
}));
};
const
handlePasswordAgainChange
=
(
event
:
React
.
ChangeEvent
<
HTMLInputElement
>
)
=>
{
setPassword
((
prevPass
)
=>
({
...
prevPass
,
again
:
event
.
target
.
value
}));
setPasswordAgain
(()
=>
(
event
.
target
.
value
));
};
const
handleSignup
=
()
=>
{
...
...
@@ -76,18 +100,19 @@ const SignupPage: React.FC<Props> = ({ connector }) => {
return
(
<
div
className
=
{
S
[
'
container
'
]
}
>
<
input
placeholder
=
{
'
이름
'
}
/>
<
input
placeholder
=
{
'
아이디
'
}
/>
<
input
placeholder
=
{
'
이메일
'
}
/>
<
input
placeholder
=
{
'
이름
'
}
onChange
=
{
handleNameChange
}
/>
<
input
placeholder
=
{
'
아이디
'
}
onChange
=
{
handleIdChange
}
/>
<
input
placeholder
=
{
'
이메일
'
}
onChange
=
{
handleEmailChange
}
/>
<
input
placeholder
=
{
'
전화번호
'
}
onChange
=
{
handlePhoneChange
}
/>
<
input
placeholder
=
{
'
비밀번호를 입력해주세요.
'
}
value
=
{
password
.
origin
}
value
=
{
acountData
.
password
}
onChange
=
{
handlePasswordChange
}
type
=
{
'
password
'
}
/>
<
input
placeholder
=
{
'
비밀번호를 한번 더 입력해주세요.
'
}
value
=
{
password
.
a
gain
}
value
=
{
password
A
gain
}
onChange
=
{
handlePasswordAgainChange
}
type
=
{
'
password
'
}
/>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment