Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
2021
Kelas D
PT Gizi Sehat - Dietela
Dietela Mobile
Commits
70e7c1e5
Commit
70e7c1e5
authored
Jun 23, 2021
by
Kefas Satrio Bangkit Solidedantyo
Browse files
[REFACTOR] change sad icon in empty data page
parent
c62e767e
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/components/core/EmptyDataPage/index.tsx
View file @
70e7c1e5
...
...
@@ -12,12 +12,7 @@ interface Props {
const
EmptyDataPage
:
FC
<
Props
>
=
({
text
})
=>
(
<
View
style
=
{
styles
.
center
}
>
<
Icon
name
=
"emoticon-sad-outline"
type
=
"material-community"
size
=
{
75
}
color
=
{
colors
.
danger
}
/>
<
Icon
name
=
"smile"
type
=
"feather"
size
=
{
75
}
color
=
{
colors
.
primaryVariant
}
/>
<
Text
style
=
{
styles
.
noRecomText
}
>
{
text
}
</
Text
>
</
View
>
);
...
...
src/scenes/questionnaire/ReadOnlyDietRecommendation/index.test.tsx
View file @
70e7c1e5
...
...
@@ -5,9 +5,11 @@ import ReadOnlyDietRecommendation from '.';
import
{
mockDietRecommendation
}
from
'
mocks/dietRecommendation
'
;
describe
(
'
ReadOnlyDietRecommendation
'
,
()
=>
{
it
(
'
shows "
Belum ada rekomendasi
" text if no recommendation is provided yet
'
,
()
=>
{
it
(
'
shows "
Silahkan tunggu rekomendasi dari nutrisionis dalam 24 jam
" text if no recommendation is provided yet
'
,
()
=>
{
const
{
getByText
}
=
render
(<
ReadOnlyDietRecommendation
/>);
expect
(
getByText
(
/Belum ada rekomendasi/i
)).
toBeTruthy
();
expect
(
getByText
(
/Silahkan tunggu rekomendasi dari nutrisionis dalam 24 jam/i
),
).
toBeTruthy
();
});
it
(
'
shows default no input text if recommendation is not fully provided yet
'
,
()
=>
{
...
...
src/scenes/questionnaire/ReadOnlyDietRecommendation/index.tsx
View file @
70e7c1e5
...
...
@@ -30,7 +30,7 @@ const ReadOnlyDietRecommendation: FC<Props> = ({ children, data }) => {
if
(
!
data
||
!
hasValues
(
data
))
{
return
(
<
View
style
=
{
styles
.
noRecom
}
>
<
EmptyDataPage
text
=
"
Belum ada
rekomendasi dari nutrisionis"
/>
<
EmptyDataPage
text
=
"
Silahkan tunggu
rekomendasi dari nutrisionis
dalam 24 jam
"
/>
{
children
}
</
View
>
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment