Fakultas Ilmu Komputer UI

[REFACTOR] change sad icon in empty data page

parent c62e767e
......@@ -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>
);
......
......@@ -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>
);
......
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