Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bodysch-frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
JetBrains YouTrack
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KSZK
DevTeam
org
BodySCH
bodysch-frontend
Merge requests
!8
Refactor structure
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Refactor structure
refactor-structure
into
dev
Overview
1
Commits
14
Changes
2
Merged
chif
requested to merge
refactor-structure
into
dev
4 years ago
Overview
1
Commits
14
Changes
2
0
0
Merge request reports
Viewing commit
305c1d4a
Prev
Next
Show latest version
2 files
+
5
−
18
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
305c1d4a
Fix crash
· 305c1d4a
Chif Gergő
authored
4 years ago
src/components/NewsContainer.tsx
+
3
−
16
View file @ 305c1d4a
Edit in single-file editor
Open in Web IDE
Show full file
import
{
CircularProgress
,
Grid
}
from
'
@material-ui/core
'
;
import
React
,
{
useEffect
}
from
'
react
'
;
import
useGetNewsList
from
'
../hooks/useGetNewsList
'
;
import
React
from
'
react
'
;
import
News
from
'
./News
'
;
interface
Props
{}
const
NewsContainer
:
React
.
FC
=
()
=>
{
const
[{
data
,
isLoading
},
getNews
]
=
useGetNewsList
();
useEffect
(()
=>
{
getNews
();
},
[
getNews
]);
const
isLoading
=
false
;
return
isLoading
?
(
<
CircularProgress
/>
)
:
(
<
Grid
container
spacing
=
{
2
}
>
{
data
&&
data
.
map
((
item
)
=>
(
<
News
title
=
{
item
.
title
}
author
=
"Anonymus"
content
=
{
item
.
text
}
createDate
=
{
item
.
publishedAt
}
/>
))
}
<
News
title
=
"ASd"
author
=
"Anonymus"
content
=
"ASDADDD"
createDate
=
"2021.01.01"
/>
</
Grid
>
);
};
Loading