Toggle navigation
Toggle navigation
This project
Loading...
Sign in
정성훈
/
MEALKHU
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
swa07016
2020-05-29 21:27:06 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bcf9d9e740ac59753fee8e9d871c61bbc3c008fc
bcf9d9e7
1 parent
b608656a
한글 웹폰트 적용
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
5 deletions
.gitignore
client/public/index.html
client/src/components/MealCard.js
client/src/pages/MenuPage.js
.gitignore
View file @
bcf9d9e
node_modules
json_datas.json
client/public/images
client/node_modules
\ No newline at end of file
...
...
client/public/index.html
View file @
bcf9d9e
<!DOCTYPE html>
<!DOCTYPE html>
<html
lang=
"en"
style=
"margin: 0;
height: 100%;
"
>
<head>
<meta
charset=
"utf-8"
/>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
/>
<link
rel=
"icon"
href=
"%PUBLIC_URL%/fork.ico"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
/>
<meta
name=
"theme-color"
content=
"#000000"
/>
...
...
@@ -28,10 +28,15 @@ height: 100%;
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>
MEALKHU
</title>
<link
href=
"https://fonts.googleapis.com/css?family=Do+Hyeon:400"
rel=
"stylesheet"
>
<style>
#root
{
font-family
:
'Do Hyeon'
,
sans-serif
;}
</style>
</head>
<body
style=
"width : 100%; height:100%; margin: 0;"
>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div
id=
"root"
style=
"width : 100%; height:100%;"
></div>
<h1>
안녕
</h1>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
...
...
client/src/components/MealCard.js
View file @
bcf9d9e
...
...
@@ -15,7 +15,6 @@ const MealCard = (props) => {
<
CardImg
top
width
=
"100%"
onerror
=
"this.src='https://pngimage.net/wp-content/uploads/2018/06/no-image-available-icon-png-8.png'"
src
=
{
props
.
img
}
alt
=
"Card image cap"
/>
<
CardBody
>
<
CardTitle
><
strong
>
{
props
.
name
}
<
/strong></
CardTitle
>
...
...
@@ -40,7 +39,7 @@ const MealCard = (props) => {
'float'
:
'left'
,
'fontSize'
:
'14px'
}}
>
V
iew
more
v
iew
more
<
/span
>
<
FontAwesomeIcon
style
=
{{
'color'
:
'black'
,
...
...
client/src/pages/MenuPage.js
View file @
bcf9d9e
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
NavBar
from
'../components/NavBar'
;
import
MealCard
from
'../components/MealCard'
;
import
{
CustomInput
,
Form
,
FormGroup
,
Label
}
from
'reactstrap'
;
import
{
Container
,
Row
,
Col
}
from
"reactstrap"
;
import
axios
from
'axios'
;
const
MenuPage
=
(
props
)
=>
{
const
[
datas
,
setDatas
]
=
useState
([]);
const
[
isLoading
,
setIsLoading
]
=
useState
(
false
);
useEffect
(()
=>
{
const
fetchData
=
async
()
=>
{
const
result
=
await
axios
(
'http://
192.168.0.2
:5000/api/datas'
,
'http://
localhost
:5000/api/datas'
,
// localhost로 바꾸기
);
setDatas
(
result
.
data
);
...
...
@@ -24,6 +27,17 @@ const MenuPage = (props) => {
<>
<
NavBar
/>
<
Container
>
{
/* ???????? ???? */
}
{
/* <FormGroup>
<Label for="exampleCheckbox">??</Label>
<div>
<CustomInput type="checkbox" id="exampleCustomInline" label="??" inline />
</div>
</FormGroup> */
}
<
/Container
>
<
Container
>
<
Row
xs
=
"2"
sm
=
"2"
md
=
"4"
>
{
...
...
Please
register
or
login
to post a comment