Skip to content

Commit c10bca8

Browse files
committed
refactor: replace FetchClient with native fetch in BookService for improved simplicity
1 parent ac7626d commit c10bca8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

apps/react-kit-demo/src/services/BookService.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { FetchClient } from '@react-kit/*';
21
import { BASE_API_URL, BOOK_API_URL } from '../constants/ApiConstants';
32
import { Book } from '../types/Book';
43

@@ -16,6 +15,6 @@ export class BookService {
1615
* @since 1.0.0
1716
*/
1817
static async getAllBooks(): Promise<Book[]> {
19-
return await FetchClient<Book[]>(`${BASE_API_URL + BOOK_API_URL}/books`);
18+
return await fetch(`${BASE_API_URL + BOOK_API_URL}/books`).then((res) => res.json());
2019
}
2120
}

0 commit comments

Comments
 (0)