@timardex/cluemart-shared 1.3.22 → 1.3.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -797,7 +797,7 @@ declare const useGetPosts: () => {
797
797
  posts: PostType[];
798
798
  }>>;
799
799
  };
800
- declare const useGetPost: (postId: string) => {
800
+ declare const useGetPost: (_id: string) => {
801
801
  error: _apollo_client.ApolloError | undefined;
802
802
  loading: boolean;
803
803
  post: PostType | null;
@@ -797,7 +797,7 @@ declare const useGetPosts: () => {
797
797
  posts: PostType[];
798
798
  }>>;
799
799
  };
800
- declare const useGetPost: (postId: string) => {
800
+ declare const useGetPost: (_id: string) => {
801
801
  error: _apollo_client.ApolloError | undefined;
802
802
  loading: boolean;
803
803
  post: PostType | null;
@@ -2927,7 +2927,6 @@ var POST_CONTENT_DATA_FIELDS_FRAGMENT = gql31`
2927
2927
  `;
2928
2928
  var POST_CONTENT_FIELDS_FRAGMENT = gql31`
2929
2929
  fragment PostContentFields on PostContentType {
2930
- _id
2931
2930
  contentData {
2932
2931
  ...PostContentDataFields
2933
2932
  }
@@ -2943,10 +2942,11 @@ var POST_FIELDS_FRAGMENT = gql31`
2943
2942
  content {
2944
2943
  ...PostContentFields
2945
2944
  }
2945
+ createdAt
2946
+ deletedAt
2946
2947
  postType
2947
2948
  tags
2948
2949
  title
2949
- createdAt
2950
2950
  updatedAt
2951
2951
  }
2952
2952
  ${POST_CONTENT_FIELDS_FRAGMENT}
@@ -2960,8 +2960,8 @@ var GET_POSTS = gql31`
2960
2960
  ${POST_FIELDS_FRAGMENT}
2961
2961
  `;
2962
2962
  var GET_POST = gql31`
2963
- query getPost($postId: ID!) {
2964
- post(postId: $postId) {
2963
+ query getPost($_id: ID!) {
2964
+ post(_id: $_id) {
2965
2965
  ...PostFields
2966
2966
  }
2967
2967
  }
@@ -3028,10 +3028,10 @@ var useGetPosts = () => {
3028
3028
  const { data, loading, error, refetch } = useQuery12(GET_POSTS);
3029
3029
  return { error, loading, posts: data?.posts || [], refetch };
3030
3030
  };
3031
- var useGetPost = (postId) => {
3031
+ var useGetPost = (_id) => {
3032
3032
  const { data, loading, error, refetch } = useQuery12(GET_POST, {
3033
- skip: !postId,
3034
- variables: { postId }
3033
+ skip: !_id,
3034
+ variables: { _id }
3035
3035
  });
3036
3036
  return { error, loading, post: data?.post || null, refetch };
3037
3037
  };