Fakultas Ilmu Komputer UI

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

Fix client list buttons bug

parent 212ca2c9
...@@ -5,6 +5,7 @@ export const styles = StyleSheet.create({ ...@@ -5,6 +5,7 @@ export const styles = StyleSheet.create({
titleStyle: { color: colors.textBlack, textTransform: 'capitalize' }, titleStyle: { color: colors.textBlack, textTransform: 'capitalize' },
containerStyle: { containerStyle: {
marginTop: 12, marginTop: 12,
marginLeft: 5,
padding: 12, padding: 12,
overflow: 'hidden', overflow: 'hidden',
borderRadius: 4, borderRadius: 4,
...@@ -13,7 +14,7 @@ export const styles = StyleSheet.create({ ...@@ -13,7 +14,7 @@ export const styles = StyleSheet.create({
flexDirection: 'row', flexDirection: 'row',
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
width: 160, flexGrow: 1,
}, },
img: { img: {
marginRight: 5, marginRight: 5,
......
...@@ -5,6 +5,7 @@ export const styles = StyleSheet.create({ ...@@ -5,6 +5,7 @@ export const styles = StyleSheet.create({
titleStyle: { color: colors.textBlack, textTransform: 'capitalize' }, titleStyle: { color: colors.textBlack, textTransform: 'capitalize' },
containerStyle: { containerStyle: {
marginTop: 12, marginTop: 12,
marginRight: 5,
padding: 12, padding: 12,
overflow: 'hidden', overflow: 'hidden',
borderRadius: 4, borderRadius: 4,
...@@ -13,7 +14,7 @@ export const styles = StyleSheet.create({ ...@@ -13,7 +14,7 @@ export const styles = StyleSheet.create({
flexDirection: 'row', flexDirection: 'row',
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
width: 160, flexGrow: 1,
}, },
img: { img: {
marginRight: 5, marginRight: 5,
......
...@@ -6,7 +6,7 @@ import { useNavigation } from '@react-navigation/native'; ...@@ -6,7 +6,7 @@ import { useNavigation } from '@react-navigation/native';
import * as ROUTES from 'constants/routes'; import * as ROUTES from 'constants/routes';
import { retrieveClientListApi } from 'services/profiles'; import { retrieveClientListApi } from 'services/profiles';
import { useApi } from 'hooks'; import { useApi } from 'hooks';
import { Loader } from 'components/core'; import { Loader, EmptyDataPage } from 'components/core';
const ClientListNutritionist: FC = () => { const ClientListNutritionist: FC = () => {
const navigation = useNavigation(); const navigation = useNavigation();
...@@ -15,6 +15,9 @@ const ClientListNutritionist: FC = () => { ...@@ -15,6 +15,9 @@ const ClientListNutritionist: FC = () => {
if (isLoading) { if (isLoading) {
return <Loader />; return <Loader />;
} }
if (!clients.length) {
return <EmptyDataPage text="Belum ada klien" />;
}
return ( return (
<ScrollView contentContainerStyle={layoutStyles}> <ScrollView contentContainerStyle={layoutStyles}>
{clients.map((client, idx) => ( {clients.map((client, idx) => (
......
Supports Markdown
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