Skip to content

Commit

Permalink
refactor: remove faked fetches 🤦‍
Browse files Browse the repository at this point in the history
  • Loading branch information
johnshift committed Aug 19, 2024
1 parent 35802f6 commit 95559e5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/grants/data/get-grantee-details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { mwGET } from '@/shared/utils/mw-get';
import { grantQueryUrls } from '@/grants/core/query-urls';
import { granteeDtoSchema } from '@/grants/core/schemas';

import { fakeGrantee } from '@/grants/testutils/fake-grantee';
// import { fakeGrantee } from '@/grants/testutils/fake-grantee';

export const getGranteeDetails = async (granteeId: string) => {
return {
success: true,
message: 'Grantee details fetched successfully',
data: fakeGrantee(),
};
// return {
// success: true,
// message: 'Grantee details fetched successfully',
// data: fakeGrantee(),
// };

return mwGET({
url: `${grantQueryUrls.GRANTEE_DETAILS}/${granteeId}`,
Expand Down
12 changes: 6 additions & 6 deletions src/grants/data/get-grantee-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ import {
granteeInfiniteListPageSchema,
} from '@/grants/core/schemas';

import { fakeGrantees } from '@/grants/testutils/fake-grantee';
// import { fakeGrantees } from '@/grants/testutils/fake-grantee';

interface Props {
page: number;
searchParams?: string;
grantId: string;
}

const data = fakeGrantees();
// const data = fakeGrantees();

export const getGranteeList = async ({
page,
grantId,
searchParams = '',
}: Props): Promise<GranteeInfiniteListPage> => {
return {
page: page + 1,
data,
};
// return {
// page: page + 1,
// data,
// };

const url = createUrlWithSearchParams(
`${grantQueryUrls.grantees(grantId)}?page=${page}&limit=${PAGE_SIZE}&grantId=${grantId}`,
Expand Down

0 comments on commit 95559e5

Please sign in to comment.