Toggle navigation
Toggle navigation
This project
Loading...
Sign in
최은석
/
ossw-project
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-03 22:15:03 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5fbe6c7259d16748958e8cfceff62ee874c527aa
5fbe6c72
1 parent
8d8547ed
load menu list in menu page
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
14 deletions
client/src/Component/MenuPage.js
client/src/index.js
client/src/Component/MenuPage.js
View file @
5fbe6c7
import
'./App.css'
;
import
axios
from
"axios"
;
import
{
useEffect
}
from
'react'
;
function
MenuPage
()
{
const
getMenuList
=
()
=>
{
axios
.
get
(
"/api/menuList"
).
then
((
res
)
=>
{
console
.
log
(
res
.
data
);
});
}
useEffect
(()
=>
{
getMenuList
();
},
[]);
return
(
<
div
>
메뉴
페이지
...
...
client/src/index.js
View file @
5fbe6c7
...
...
@@ -15,23 +15,21 @@ import {
const
root
=
ReactDOM
.
createRoot
(
document
.
getElementById
(
'root'
));
root
.
render
(
<
React
.
StrictMode
>
<
div
className
=
'Screen'
style
=
{{
borderColor
:
'blue'
,
width
:
'100vw'
,
height
:
'100vh'
}}
>
<
TopBanner
/>
<
div
className
=
'Screen'
style
=
{{
borderColor
:
'blue'
,
width
:
'100vw'
,
height
:
'100vh'
}}
>
<
TopBanner
/>
<
SideChat
/>
<
div
className
=
'bodyContent'
style
=
{{
width
:
'100%'
,
height
:
'100%'
}}
>
<
Router
>
<
Routes
>
<
Route
path
=
"/"
element
=
{
<
MainPage
/>
}
/
>
<
Route
path
=
"/menu"
element
=
{
<
MenuPage
/>
}
/
>
<
/Routes
>
<
/Router
>
<
/div
>
<
SideChat
/>
<
div
className
=
'bodyContent'
style
=
{{
width
:
'100%'
,
height
:
'100%'
}}
>
<
Router
>
<
Routes
>
<
Route
path
=
"/"
element
=
{
<
MainPage
/>
}
/
>
<
Route
path
=
"/menu"
element
=
{
<
MenuPage
/>
}
/
>
<
/Routes
>
<
/Router
>
<
/div
>
<
/div
>
<
/React.StrictMode
>
<
/div
>
);
reportWebVitals
();
...
...
Please
register
or
login
to post a comment