Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
client
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
Gaeon Kim
client
Commits
6c98160c
Commit
6c98160c
authored
1 year ago
by
유 채린
Browse files
Options
Downloads
Patches
Plain Diff
feat: add router
parent
fbf1f952
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pages/Header.js
+25
-5
25 additions, 5 deletions
src/pages/Header.js
with
25 additions
and
5 deletions
src/pages/Header.js
+
25
−
5
View file @
6c98160c
import
React
from
'
react
'
;
import
header_styles
from
'
./Header.module.css
'
;
import
{
useNavigate
}
from
"
react-router-dom
"
;
const
Header
=
()
=>
{
const
navigate
=
useNavigate
();
const
goToHome
=
()
=>
{
navigate
(
"
/
"
);
}
const
goToSearch
=
()
=>
{
navigate
(
"
/search
"
);
}
const
goToClientservice
=
()
=>
{
navigate
(
"
/clientservice
"
);
}
const
goToMypage
=
()
=>
{
navigate
(
"
/mypage
"
);
}
return
(
<
header
>
<
div
className
=
{
header_styles
.
header_content
}
>
...
...
@@ -8,11 +28,11 @@ const Header=()=>{
<
div
className
=
{
header_styles
.
header_logo
}
><
a
href
=
"
/
"
><
img
src
=
"
/planpuzzle_logo.png
"
><
/img></
a
><
/div
>
<
nav
className
=
{
header_styles
.
header_nav
}
>
<
ul
>
<
li
><
a
href
=
"
/
"
>
홈
<
/a></
li
>
<
li
><
a
href
=
"
/s
earch
"
>
검색
<
/a></
li
>
<
li
><
a
href
=
"
/c
lientservice
"
>
고객지원
<
/a></
li
>
<
li
><
a
href
=
"
/m
ypage
"
>
마이페이지
<
/a></
li
>
<
li
><
a
href
=
"
#logout
"
><
img
src
=
"
/logout_img.png
"
><
/img></
a
><
/li
>
<
li
onClick
=
{
goToHome
}
><
a
>
홈
<
/a></
li
>
<
li
onClick
=
{
goToS
earch
}
><
a
>
검색
<
/a></
li
>
<
li
onClick
=
{
goToC
lientservice
}
><
a
>
고객지원
<
/a></
li
>
<
li
onClick
=
{
goToM
ypage
}
><
a
>
마이페이지
<
/a></
li
>
<
li
><
a
><
img
src
=
"
/logout_img.png
"
><
/img></
a
><
/li
>
<
/ul
>
<
/nav
>
...
...
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