Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
messenger
Commits
0716ead6
Commit
0716ead6
authored
Jan 15, 2021
by
우지원
Browse files
menu수정
parent
984a1deb
Changes
4
Show whitespace changes
Inline
Side-by-side
client/src/Components/Menu.js
View file @
0716ead6
...
@@ -12,15 +12,20 @@ function Menu() {
...
@@ -12,15 +12,20 @@ function Menu() {
return
(
return
(
<
Navbar
bg
=
"
dark
"
variant
=
"
dark
"
>
<
Navbar
bg
=
"
dark
"
variant
=
"
dark
"
>
<
Navbar
.
Brand
href
=
"
/home
"
>
YDK
Messenger
<
/Navbar.Brand
>
<
Navbar
.
Brand
href
=
"
/home
"
>
YDK
Messenger
<
/Navbar.Brand
>
{
name
?
<>
<
div
className
=
'
ml-1 mr-2
'
style
=
{{
color
:
'
white
'
}}
>
{
name
}
님
환영합니다
<
/div
>
<
div
className
=
'
ml-1 mr-2
'
style
=
{{
color
:
'
white
'
}}
>
{
name
}
님
환영합니다
<
/div
>
<
Nav
className
=
"
mr-auto
"
>
<
Nav
className
=
"
mr-auto
"
>
<
Nav
.
Link
href
=
"
/home
"
>
Home
<
/Nav.Link
>
<
Nav
.
Link
href
=
"
/home
"
>
Home
<
/Nav.Link
>
<
Nav
.
Link
href
=
"
/profile
"
>
Profile
<
/Nav.Link
>
<
Nav
.
Link
href
=
"
/profile
"
>
Profile
<
/Nav.Link
>
<
Nav
.
Link
href
=
"
/hello
"
>
Hello
<
/Nav.Link
>
<
Nav
.
Link
href
=
"
/hello
"
>
Hello
<
/Nav.Link
>
<
/Nav
>
<
/Nav
>
<
Link
to
=
"
./login
"
>
<
Button
className
=
"
ml-auto
"
onClick
=
{()
=>
handleLogout
()}
variant
=
"
light
"
className
=
"
ml-3
"
>
Logout
<
/Button
>
<
Button
onClick
=
{()
=>
handleLogout
()}
variant
=
"
light
"
className
=
"
ml-3
"
>
Logout
<
/Button
>
<
/
>
<
/Link
>
:
<
Nav
className
=
"
ml-auto
"
>
<
Nav
.
Link
href
=
'
/login
'
>
로그인
<
/Nav.Link
>
<
Nav
.
Link
href
=
'
/signup
'
>
회원가입
<
/Nav.Link
>
<
/Nav>
}
<
/Navbar
>
<
/Navbar
>
)
)
}
}
...
...
client/src/Pages/LogInPage.js
View file @
0716ead6
...
@@ -55,9 +55,7 @@ function LogIn() {
...
@@ -55,9 +55,7 @@ function LogIn() {
return
(
return
(
<>
<>
<
Navbar
bg
=
"
dark
"
variant
=
"
dark
"
>
<
Menu
/>
<
Navbar
.
Brand
>
YDK
Messenger
<
/Navbar.Brand
>
<
/Navbar
>
<
Form
onSubmit
=
{
handleSubmit
}
className
=
'
vh-100 flex-column align-items-center justify-content-center mt-2
'
>
<
Form
onSubmit
=
{
handleSubmit
}
className
=
'
vh-100 flex-column align-items-center justify-content-center mt-2
'
>
<
Container
className
=
"
d-flex justify-content-center
"
>
<
Container
className
=
"
d-flex justify-content-center
"
>
<
div
className
=
"
mt-5 p-5 shadow w-75
"
>
<
div
className
=
"
mt-5 p-5 shadow w-75
"
>
...
@@ -99,10 +97,6 @@ function LogIn() {
...
@@ -99,10 +97,6 @@ function LogIn() {
block
>
block
>
{
loading
&&
<
Spinner
as
=
'
span
'
animation
=
'
border
'
size
=
'
sm
'
role
=
'
status
'
aria
-
hidden
=
'
true
'
/>
}
{
'
'
}
로그인
{
loading
&&
<
Spinner
as
=
'
span
'
animation
=
'
border
'
size
=
'
sm
'
role
=
'
status
'
aria
-
hidden
=
'
true
'
/>
}
{
'
'
}
로그인
<
/Button
>
<
/Button
>
<
Link
to
=
"
./signup
"
>
<
h6
type
=
"
button
"
className
=
"
text-right mt-2
"
style
=
{{
cursor
:
'
pointer
'
}}
>
회원가입
<
/h6
>
<
/Link
>
{
error
&&
<
Alert
variant
=
'
danger
'
>
{
error
&&
<
Alert
variant
=
'
danger
'
>
{
error
}
{
error
}
<
/Alert>
}
<
/Alert>
}
...
...
client/src/Pages/SignUpPage.js
View file @
0716ead6
...
@@ -61,9 +61,7 @@ function SingUp() {
...
@@ -61,9 +61,7 @@ function SingUp() {
return
(
return
(
<>
<>
<
Navbar
bg
=
"
dark
"
variant
=
"
dark
"
>
<
Menu
/>
<
Navbar
.
Brand
>
YDK
Messenger
<
/Navbar.Brand
>
<
/Navbar
>
<
Form
onSubmit
=
{
handleSubmit
}
className
=
'
vh-100 flex-column align-items-center justify-content-center mt-2
'
>
<
Form
onSubmit
=
{
handleSubmit
}
className
=
'
vh-100 flex-column align-items-center justify-content-center mt-2
'
>
<
Container
className
=
"
d-flex justify-content-center
"
>
<
Container
className
=
"
d-flex justify-content-center
"
>
...
...
client/src/utils/auth.js
View file @
0716ead6
...
@@ -10,7 +10,7 @@ export async function handleLogout() {
...
@@ -10,7 +10,7 @@ export async function handleLogout() {
sessionStorage
.
clear
();
sessionStorage
.
clear
();
await
axios
.
get
(
'
/auth/logout
'
)
await
axios
.
get
(
'
/auth/logout
'
)
//login페이지로 이동
//login페이지로 이동
//
window.location.href='/login'
window
.
location
.
href
=
'
/login
'
}
}
export
function
isAuthenticated
()
{
export
function
isAuthenticated
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment