Fakultas Ilmu Komputer UI

Commit 8ce6e9eb authored by Kefas Satrio Bangkit Solideantyo's avatar Kefas Satrio Bangkit Solideantyo
Browse files

[REFACTOR] change sad icon in empty data page

parent a17186c2
Pipeline #82961 passed with stages
in 10 minutes and 14 seconds
......@@ -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.green} />
<Text style={styles.noRecomText}>{text}</Text>
</View>
);
......
......@@ -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', () => {
......
......@@ -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>
);
......
......@@ -10,6 +10,7 @@ export const colors = {
border: '#E0E0E0',
buttonYellow: '#E6AF05',
lightYellow: '#FDF1CD',
green: '#4ee44e',
warning: '#FF9A3E',
danger: '#F44771',
textBlack: '#000000',
......
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