Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김건희
/
OSSW_Weather_Briefing
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
김건희
2022-06-09 00:28:52 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
45da61cb8033a689c278cae67970ddfd8f40cdc6
45da61cb
1 parent
3b214238
[Update] Change Address
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
14 deletions
weather_briefing/src/App.js
weather_briefing/src/component/views/MainPage/MainPage.js
weather_briefing/src/component/views/RecommandPage/RecommandPage.js
weather_briefing/src/component/views/RegisterPage/RegisterPage.js
weather_briefing/src/component/views/WeatherPage/WeatherPage.js
weather_briefing/src/component/views/style/RegisterPage.scss
weather_briefing/src/App.js
View file @
45da61c
...
...
@@ -11,7 +11,7 @@ function App() {
<
div
>
<
Routes
>
<
Route
exact
path
=
"/login"
element
=
{
<
LoginPage
/>
}
/
>
<
Route
exact
path
=
"/
register
"
element
=
{
<
RegisterPage
/>
}
/
>
<
Route
exact
path
=
"/"
element
=
{
<
RegisterPage
/>
}
/
>
<
Route
exact
path
=
"/main"
element
=
{
<
MainPage
/>
}
/
>
<
Route
exact
path
=
"/weather"
element
=
{
<
WeatherPage
/>
}
/
>
<
Route
exact
path
=
"/recommand"
element
=
{
<
RecommandPage
/>
}
/
>
...
...
weather_briefing/src/component/views/MainPage/MainPage.js
View file @
45da61c
...
...
@@ -132,11 +132,11 @@ function MainPage(props) {
const
onClickLogout
=
useCallback
((
event
)
=>
{
dispatch
(
logout
());
navigate
(
'
..
/login'
);
navigate
(
'/login'
);
})
const
onClickRegister
=
useCallback
((
event
)
=>
{
navigate
(
'
../register
'
);
navigate
(
'
/
'
);
})
const
onSubmitHandler
=
useCallback
((
event
)
=>
{
//제출 전 오류 확인 함수
...
...
@@ -256,7 +256,7 @@ function MainPage(props) {
<
hr
/>
<
div
className
=
"main-btn-area"
onClick
=
{
onSubmitHandler
}
>
<
button
className
=
"submit-btn"
>
양식
제출
날씨
정보
<
/button
>
<
/div
>
<
div
className
=
"main-check-variable"
>
...
...
weather_briefing/src/component/views/RecommandPage/RecommandPage.js
View file @
45da61c
...
...
@@ -33,11 +33,11 @@ function RecommandPage(props) {
const
onClickLogout
=
useCallback
((
event
)
=>
{
dispatch
(
logout
());
navigate
(
'
..
/login'
);
navigate
(
'/login'
);
})
const
onClickRegister
=
useCallback
((
event
)
=>
{
navigate
(
'
../register
'
);
navigate
(
'
/
'
);
})
const
onClickTitle
=
useCallback
((
event
)
=>
{
...
...
weather_briefing/src/component/views/RegisterPage/RegisterPage.js
View file @
45da61c
...
...
@@ -86,6 +86,10 @@ function RegisterPage(props) {
}
},
[
checkPasswordError
]);
const
onClickLogIn
=
useCallback
((
event
)
=>
{
navigate
(
'../login'
);
})
const
onPasswordCheckHandler
=
useCallback
((
event
)
=>
{
//비밀번호를 입력할때마다 password 를 검증하는 함수
setPasswordError
(
event
.
currentTarget
.
value
!==
Password
);
...
...
@@ -131,6 +135,7 @@ function RegisterPage(props) {
},
[
checkIdError
,
checkNameError
,
checkPasswordError
,
checkRegisterError
,
checkSexError
,
Password
,
PasswordCheck
,
Sex
,
dispatch
,
registerResult
,
checkRegister
]);
return
(
<>
<
div
id
=
"body"
>
<
div
className
=
"register-box"
>
<
h2
>
회원가입
<
/h2
>
...
...
@@ -199,11 +204,10 @@ function RegisterPage(props) {
가입하기
<
/button
>
<
/div
>
<
div
className
=
"check-variable"
>
<
/div
>
{
checkRegisterError
&&
<
div
style
=
{{
color
:
'red'
}}
>
정보를
제대로
입력해주세요
.
<
/div>
}
<
/div
>
<
/div
>
<
/div
>
<
/
>
);
}
...
...
weather_briefing/src/component/views/WeatherPage/WeatherPage.js
View file @
45da61c
...
...
@@ -4,6 +4,7 @@ import { useNavigate } from "react-router-dom";
import
{
recommend
}
from
"../../../modules/clothes"
;
import
{
logout
}
from
"../../../modules/user"
;
import
"../style/WeatherPage.scss"
function
WeatherPage
(
props
)
{
const
dispatch
=
useDispatch
();
const
navigate
=
useNavigate
();
...
...
@@ -158,7 +159,6 @@ function WeatherPage(props) {
useEffect
(()
=>
{
user
.
then
((
result
)
=>
{
console
.
log
(
result
);
if
(
result
.
logData
.
gender
===
'0'
)
{
userGender
=
0
;
...
...
@@ -172,11 +172,11 @@ function WeatherPage(props) {
const
onClickLogout
=
useCallback
((
event
)
=>
{
dispatch
(
logout
());
navigate
(
'
..
/login'
);
navigate
(
'/login'
);
})
const
onClickRegister
=
useCallback
((
event
)
=>
{
navigate
(
'
../register
'
);
navigate
(
'
/
'
);
})
const
onClickTitle
=
useCallback
((
event
)
=>
{
...
...
@@ -198,7 +198,6 @@ function WeatherPage(props) {
rain
:
isRain
}
console
.
log
(
sendData
);
dispatch
(
recommend
(
sendData
));
navigate
(
'/recommand'
);
...
...
@@ -258,7 +257,7 @@ function WeatherPage(props) {
<
/div
>
<
div
className
=
"weather-btn-area"
onClick
=
{
onSubmitHandler
}
>
<
button
className
=
"submit-btn"
>
양식
제출
옷
추천
<
/button
>
<
/div
>
<
/div
>
...
...
weather_briefing/src/component/views/style/RegisterPage.scss
View file @
45da61c
...
...
@@ -4,6 +4,7 @@
box-sizing
:
border-box
;
background-color
:
rgb
(
245
,
235
,
223
);
}
#body
{
display
:
flex
;
justify-content
:
center
;
...
...
Please
register
or
login
to post a comment