Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PB138 - Project - Restaurant Corona
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andrej Bátora
PB138 - Project - Restaurant Corona
Commits
fb278f64
There was an error fetching the commit references. Please try again later.
Commit
fb278f64
authored
2 years ago
by
Anna Mária Kollarčíková
Browse files
Options
Downloads
Patches
Plain Diff
tydenni menu
parent
a68c6399
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/src/components/Pages/WeeklyMenu.tsx
+15
-12
15 additions, 12 deletions
app/src/components/Pages/WeeklyMenu.tsx
with
15 additions
and
12 deletions
app/src/components/Pages/WeeklyMenu.tsx
+
15
−
12
View file @
fb278f64
...
@@ -18,24 +18,27 @@ export const WeeklyMenu = () => {
...
@@ -18,24 +18,27 @@ export const WeeklyMenu = () => {
};
};
// get menu for current day
// get menu for current day
axios
.
get
(
'
http://localhost:8080/menus/
'
,
menuData
)
axios
.
get
(
'
http://localhost:8080/menus/
'
)
.
then
((
response
)
=>
{
.
then
((
response
)
=>
{
console
.
log
(
response
);
console
.
log
(
response
);
// set the state of the user
// set the state of the user
setData
(
response
.
data
)
setData
(
response
.
data
)
});
});
return
(
if
(
data
.
meals
)
{
<
section
className
=
"weekly-menu"
>
return
(
<
h1
className
=
"weekly-menu__header"
>
Týdenní menu
</
h1
>
{
currentMenu
.
meals
.
map
((
item
)
=>
{
<
section
className
=
"weekly-menu"
>
return
(
<
h1
className
=
"weekly-menu__header"
>
Týdenní menu
</
h1
>
<
div
>
{
currentMenu
.
meals
.
map
((
item
)
=>
{
<
Meal
key
=
{
item
.
id
}
{
...
item
}
/>
return
(
</
div
>
<
div
>
<
Meal
key
=
{
item
.
id
}
{
...
item
}
/>
</
div
>
)
)
})
})
}
}
</
section
>
</
section
>
);
);
}
};
};
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