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
travel
Commits
2c267d4b
Commit
2c267d4b
authored
Jul 11, 2022
by
Kim, MinGyu
Browse files
로그인버튼 수정
parent
5e259cfd
Changes
5
Hide whitespace changes
Inline
Side-by-side
frontend/src/App.tsx
View file @
2c267d4b
...
@@ -5,30 +5,17 @@ import { Login, Signup } from "./auth";
...
@@ -5,30 +5,17 @@ import { Login, Signup } from "./auth";
import
{
Board
}
from
"
./board
"
;
import
{
Board
}
from
"
./board
"
;
import
{
Header
,
Body
}
from
"
./home
"
;
import
{
Header
,
Body
}
from
"
./home
"
;
import
Posting
from
"
./post/posting
"
;
import
Posting
from
"
./post/posting
"
;
import
{
AuthProvider
}
from
"
./auth/auth.context
"
;
import
Layout
from
"
./commons/layout
"
;
export
const
App
=
()
=>
{
export
const
App
=
()
=>
{
return
(
return
(
<
BrowserRouter
>
<
BrowserRouter
>
<
Routes
>
<
Routes
>
{
/* <Route element={<Layout children={} />}> */
}
<
Route
path
=
"login"
element
=
{
<
Login
/>
}
/>
<
Route
path
=
"login"
element
=
{
<
AuthProvider
>
<
Login
/>
</
AuthProvider
>
}
/>
<
Route
path
=
"signup"
element
=
{
<
Signup
/>
}
/>
<
Route
path
=
"signup"
element
=
{
<
Signup
/>
}
/>
<
Route
path
=
"/"
element
=
{
<
Header
/>
}
>
<
Route
path
=
"/"
element
=
{
<
Header
/>
}
>
<
Route
index
element
=
{
<
Body
/>
}
/>
<
Route
index
element
=
{
<
Body
/>
}
/>
<
Route
path
=
"board"
element
=
{
<
Board
/>
}
/>
<
Route
path
=
"board"
element
=
{
<
Board
/>
}
/>
<
Route
path
=
"posting"
element
=
{
<
Posting
/>
}
/>
<
Route
path
=
"posting"
element
=
{
<
Posting
/>
}
/>
</
Route
>
</
Route
>
{
/* </Route> */
}
</
Routes
>
</
Routes
>
</
BrowserRouter
>
</
BrowserRouter
>
);
);
...
...
frontend/src/auth/login.tsx
View file @
2c267d4b
...
@@ -54,14 +54,14 @@ export default function Login() {
...
@@ -54,14 +54,14 @@ export default function Login() {
<
div
className
=
"bg-white w-1/2 md:w-1/3 my-8 text-center text-2xl"
>
<
div
className
=
"bg-white w-1/2 md:w-1/3 my-8 text-center text-2xl"
>
<
Link
to
=
"/"
>
Travel Report
</
Link
>
<
Link
to
=
"/"
>
Travel Report
</
Link
>
</
div
>
</
div
>
<
div
className
=
"flex flex-col w-full md:w-1/
2
p-8 md:p-4 md:p-0"
>
<
div
className
=
"flex flex-col w-full md:w-1/
3
p-8 md:p-4 md:p-0"
>
<
form
onSubmit
=
{
handleSubmit
}
>
<
form
onSubmit
=
{
handleSubmit
}
>
<
div
className
=
"flex flex-col md:flex-row border-2 border-black rounded-xl p-8 md:p-12 gap-y-4 md:gap-x-6"
>
<
div
className
=
"flex flex-col md:flex-row border-2 border-black rounded-xl p-8 md:p-12 gap-y-4 md:gap-x-6"
>
<
div
className
=
"flex flex-col md:w-2/3 md:gap-2 "
>
<
div
className
=
"flex flex-col md:w-2/3 md:gap-2 "
>
<
input
<
input
className
=
"
placeholder
:
text
-
slate
-
300
className
=
"
placeholder
:
text
-
slate
-
300
bg
-
white
border
border
-
slate
-
500
md
:
rounded
-
2xl
bg
-
white
border
border
-
slate
-
500
md
:
rounded
-
2xl
py
-
3
md
:
py
-
2
pl
-
9
pr
-
3
my
-
2
py
-
3
md
:
py
-
2
pl
-
9
pr
-
3
focus
:
border
-
black
focus
:
border
-
black
"
"
placeholder
=
"이메일"
placeholder
=
"이메일"
...
...
frontend/src/commons/layout.tsx
deleted
100644 → 0
View file @
5e259cfd
import
React
,
{
ReactNode
}
from
"
react
"
;
import
{
AuthProvider
}
from
"
../auth/auth.context
"
;
export
default
function
Layout
({
children
}:
{
children
:
ReactNode
})
{
return
<
AuthProvider
>
{
children
}
</
AuthProvider
>;
}
frontend/src/home/header.tsx
View file @
2c267d4b
...
@@ -15,21 +15,22 @@ export default function Header() {
...
@@ -15,21 +15,22 @@ export default function Header() {
</
Link
>
</
Link
>
</
button
>
</
button
>
<
div
className
=
"flex flex-row-reverse"
>
<
div
className
=
"flex flex-row-reverse"
>
<
button
className
=
"px-5 py-2 bg-teal-400 rounded"
>
<
div
className
=
"px-5 py-2 bg-teal-400 rounded"
>
<
Link
{
localStorage
.
getItem
(
"
survey-user-info
"
)
?
(
to
=
"/login"
<
button
className
=
"hover:bg-teal-100 focus:text-purple-500 "
onClick
=
{
()
=>
{
>
logout
();
Login
}
}
</
Link
>
>
<
button
Logout
onClick
=
{
()
=>
{
</
button
>
logout
();
)
:
(
}
}
<
button
>
>
<
Link
to
=
"/login"
>
Login
</
Link
>
Logout
</
button
>
</
button
>
)
}
</
button
>
</
div
>
<
button
className
=
"px-5 py-2 bg-purple-400 rounded"
>
<
button
className
=
"px-5 py-2 bg-purple-400 rounded"
>
<
Link
<
Link
to
=
"/board"
to
=
"/board"
...
...
frontend/src/index.tsx
View file @
2c267d4b
import
React
from
"
react
"
;
import
React
from
"
react
"
;
import
{
createRoot
}
from
"
react-dom/client
"
;
import
{
createRoot
}
from
"
react-dom/client
"
;
import
{
App
}
from
"
./App
"
;
import
{
App
}
from
"
./App
"
;
import
{
AuthProvider
}
from
"
./auth/auth.context
"
;
const
container
=
document
.
getElementById
(
"
root
"
);
const
container
=
document
.
getElementById
(
"
root
"
);
const
root
=
createRoot
(
container
!
);
const
root
=
createRoot
(
container
!
);
root
.
render
(
root
.
render
(
<
React
.
StrictMode
>
<
React
.
StrictMode
>
<
App
/>
<
AuthProvider
>
<
App
/>
</
AuthProvider
>
</
React
.
StrictMode
>
</
React
.
StrictMode
>
);
);
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