Skip to content

Commit

Permalink
remove unintended implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Sep 12, 2023
1 parent b035fd4 commit 59e5a81
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 57 deletions.
3 changes: 1 addition & 2 deletions src/CAREUI/misc/PaginatedList.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { createContext, useContext, useState } from "react";
import { QueryRoute } from "../../Utils/request/types";
import { PaginatedResponse } from "../../Utils/request/usePaginatedQuery";
import { PaginatedResponse, QueryRoute } from "../../Utils/request/types";
import useQuery, { QueryOptions } from "../../Utils/request/useQuery";
import ButtonV2, {
CommonButtonProps,
Expand Down
2 changes: 1 addition & 1 deletion src/Redux/api.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PaginatedResponse } from "../Utils/request/usePaginatedQuery";
import { LocationModel } from "../Components/Facility/models";
import { PaginatedResponse } from "../Utils/request/types";

/**
* A fake function that returns an empty object casted to type T
Expand Down
7 changes: 7 additions & 0 deletions src/Utils/request/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,10 @@ export interface RequestOptions {
body?: object;
pathParams?: Record<string, string>;
}

export interface PaginatedResponse<TItem> {
count: number;
next: string | null;
previous: string | null;
results: TItem[];
}
54 changes: 0 additions & 54 deletions src/Utils/request/usePaginatedQuery.ts

This file was deleted.

0 comments on commit 59e5a81

Please sign in to comment.