Fakultas Ilmu Komputer UI

Commit c0589f58 authored by Kefas Satrio Bangkit Solidedantyo's avatar Kefas Satrio Bangkit Solidedantyo
Browse files

Merge branch 'change-empty-data-page' into 'staging'

[REFACTOR] change sad icon in empty data page

See merge request !77
parents c62e767e 70e7c1e5
Pipeline #82967 failed with stages
in 56 minutes and 54 seconds
...@@ -12,12 +12,7 @@ interface Props { ...@@ -12,12 +12,7 @@ interface Props {
const EmptyDataPage: FC<Props> = ({ text }) => ( const EmptyDataPage: FC<Props> = ({ text }) => (
<View style={styles.center}> <View style={styles.center}>
<Icon <Icon name="smile" type="feather" size={75} color={colors.primaryVariant} />
name="emoticon-sad-outline"
type="material-community"
size={75}
color={colors.danger}
/>
<Text style={styles.noRecomText}>{text}</Text> <Text style={styles.noRecomText}>{text}</Text>
</View> </View>
); );
......
...@@ -5,9 +5,11 @@ import ReadOnlyDietRecommendation from '.'; ...@@ -5,9 +5,11 @@ import ReadOnlyDietRecommendation from '.';
import { mockDietRecommendation } from 'mocks/dietRecommendation'; import { mockDietRecommendation } from 'mocks/dietRecommendation';
describe('ReadOnlyDietRecommendation', () => { 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 />); 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', () => { it('shows default no input text if recommendation is not fully provided yet', () => {
......
...@@ -30,7 +30,7 @@ const ReadOnlyDietRecommendation: FC<Props> = ({ children, data }) => { ...@@ -30,7 +30,7 @@ const ReadOnlyDietRecommendation: FC<Props> = ({ children, data }) => {
if (!data || !hasValues(data)) { if (!data || !hasValues(data)) {
return ( return (
<View style={styles.noRecom}> <View style={styles.noRecom}>
<EmptyDataPage text="Belum ada rekomendasi dari nutrisionis" /> <EmptyDataPage text="Silahkan tunggu rekomendasi dari nutrisionis dalam 24 jam" />
{children} {children}
</View> </View>
); );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment