Skip to content

Commit 6277b4e

Browse files
fix: fix type issues
1 parent 4007483 commit 6277b4e

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

wp-react-lib/src/consumers/MediaConsumer.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from 'react'
22
import { MediaContext } from '../providers/MediaProvider'
3-
import type { Media } from '../types';
43

54
interface MediaConsumerProps {
65
children: React.ReactNode | React.ReactNode[] | React.ReactElement | React.ReactElement[];

wp-react-lib/src/hooks/posts.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ interface UsePostsProps {
1717
previewNonce?: string;
1818
previewId?: string;
1919
search?: string;
20+
after?: string;
2021
}
2122

2223
interface UsePostsReturn {
@@ -51,7 +52,8 @@ export const usePosts = (props: UsePostsProps): UsePostsReturn => {
5152
locale,
5253
previewNonce,
5354
previewId,
54-
search
55+
search,
56+
after
5557
} = props;
5658

5759
const dispatch = useDispatch() as any; // Type assertion to handle thunk actions
@@ -85,7 +87,8 @@ export const usePosts = (props: UsePostsProps): UsePostsReturn => {
8587
locale,
8688
previewNonce,
8789
previewId,
88-
search
90+
search,
91+
after
8992
}));
9093
}
9194
}, [categories, locale, slug, taxonomy, page, perPage, search, dispatch, type, before, fields, store, previewNonce, previewId]);
@@ -104,7 +107,8 @@ export const usePosts = (props: UsePostsProps): UsePostsReturn => {
104107
locale,
105108
previewNonce,
106109
previewId,
107-
search
110+
search,
111+
after
108112
}));
109113
}, []);
110114

0 commit comments

Comments
 (0)