Skip to content

Commit

Permalink
SSRの実装
Browse files Browse the repository at this point in the history
  • Loading branch information
nouzoehiroaki committed Feb 3, 2024
1 parent bded193 commit 59ca4e0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/microcms/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export const client = createClient({
export const getAllBooks = async () =>{
const allBooks = await client.getList<BookType>({
endpoint: 'bookcommerce',
customRequestInit: {
cache: 'no-store',
},
});
return allBooks;
};
Expand All @@ -18,6 +21,9 @@ export const getDetailBook = async (contentId: string) =>{
const detailBook = await client.getListDetail<BookType>({
endpoint: 'bookcommerce',
contentId,
customRequestInit: {
cache: 'no-store',
},
});
return detailBook;
};

0 comments on commit 59ca4e0

Please sign in to comment.