Halaman unblock user
Add: - app/(application)/(user)/profile/[id]/blocked-list.tsx app/(application)/(user)/profile/[id]/detail-blocked.tsx components/_ShareComponent/ListEmptyComponent.tsx components/_ShareComponent/ListLoaderFooterComponent.tsx components/_ShareComponent/ListSkeletonComponent.tsx hooks/use-paginated-api.ts service/api-client/api-blocked.ts Fix: modified: app/(application)/(user)/profile/_layout.tsx modified: components/_ShareComponent/NewWrapper.tsx modified: components/index.ts modified: screens/Profile/ListPage.tsx modified: styles/global-styles.ts ### No Issue
This commit is contained in:
20
components/_ShareComponent/ListEmptyComponent.tsx
Normal file
20
components/_ShareComponent/ListEmptyComponent.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import { View } from "react-native";
|
||||
import TextCustom from "../Text/TextCustom";
|
||||
|
||||
// Komponen Empty
|
||||
const ListEmptyComponent = ({ search }: { search?: string }) => (
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
padding: 20,
|
||||
}}
|
||||
>
|
||||
<TextCustom align="center" color="gray">
|
||||
{search ? "Tidak ada hasil pencarian" : "Tidak ada data"}
|
||||
</TextCustom>
|
||||
</View>
|
||||
);
|
||||
|
||||
export default ListEmptyComponent;
|
||||
11
components/_ShareComponent/ListLoaderFooterComponent.tsx
Normal file
11
components/_ShareComponent/ListLoaderFooterComponent.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { View } from "react-native";
|
||||
import LoaderCustom from "../Loader/LoaderCustom";
|
||||
|
||||
const ListLoaderFooterComponent = () =>(
|
||||
<View style={{ paddingVertical: 16, alignItems: "center" }}>
|
||||
<LoaderCustom />
|
||||
</View>
|
||||
)
|
||||
|
||||
|
||||
export default ListLoaderFooterComponent;
|
||||
21
components/_ShareComponent/ListSkeletonComponent.tsx
Normal file
21
components/_ShareComponent/ListSkeletonComponent.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { View } from "react-native";
|
||||
import StackCustom from "../Stack/StackCustom";
|
||||
import SkeletonCustom from "./SkeletonCustom";
|
||||
|
||||
const ListSkeletonComponent = ({
|
||||
length = 5,
|
||||
height = 100,
|
||||
}: {
|
||||
length?: number;
|
||||
height?: number;
|
||||
}) => (
|
||||
<View style={{ flex: 1 }}>
|
||||
<StackCustom>
|
||||
{Array.from({ length }).map((_, i) => (
|
||||
<SkeletonCustom height={height} key={i} />
|
||||
))}
|
||||
</StackCustom>
|
||||
</View>
|
||||
);
|
||||
|
||||
export default ListSkeletonComponent;
|
||||
@@ -40,8 +40,8 @@ interface StaticModeProps extends BaseProps {
|
||||
|
||||
interface ListModeProps extends BaseProps {
|
||||
children?: never;
|
||||
listData: any[];
|
||||
renderItem: FlatListProps<any>["renderItem"];
|
||||
listData?: any[];
|
||||
renderItem?: FlatListProps<any>["renderItem"];
|
||||
onEndReached?: () => void;
|
||||
// ✅ Gunakan tipe yang kompatibel dengan FlatList
|
||||
ListHeaderComponent?: React.ReactElement | null;
|
||||
|
||||
Reference in New Issue
Block a user