Skip to content

Commit

Permalink
ISR実装
Browse files Browse the repository at this point in the history
  • Loading branch information
nouzoehiroaki committed Feb 3, 2024
1 parent 0eb0ce3 commit abfb827
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/app/profile/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default async function ProfilePage() {
</div>

<span className='font-medium text-lg mb-4 mt-4 block'>購入した記事</span>
<div className='flex gap-6 justify-center'>
<div className='flex gap-6 justify-center flex-wrap'>
{purchasesDetailBooks.map((purchasesDetailBook: BookType) => (
<PurchasesDetailBook
key={purchasesDetailBook.id}
Expand Down
2 changes: 1 addition & 1 deletion src/components/layouts/Book/Book.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const Book = ({ book, isPurchase }: BookProps) => {
}
`}</style>

<div className='flex flex-col m-4 w-[30%]'>
<div className='flex flex-col m-4 lg:w-[30%] md:w-[45%]'>
<a onClick={handlePurchaseClick} className='cursor-pointer shadow-2xl duration-300 hover:translate-y-1 hover:shadow-none h-full bg-slate-100'>
<Image
priority
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const PurchasesDetailBook = ({ PurchasesDetailBook }: PurchasesDetailBookprops)
return (
<Link
href={`/book/${PurchasesDetailBook.id}`}
className='cursor-pointer shadow-2xl duration-300 hover:translate-y-1 hover:shadow-none w-[30%] bg-slate-100'
className='cursor-pointer shadow-2xl duration-300 hover:translate-y-1 hover:shadow-none lg:w-[30%] md:w-[45%] bg-slate-100'
>
<Image
priority
Expand Down
4 changes: 3 additions & 1 deletion src/lib/microcms/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export const getAllBooks = async () =>{
const allBooks = await client.getList<BookType>({
endpoint: 'bookcommerce',
customRequestInit: {
cache: 'no-store',
next:{
revalidate: 3600
}
},
});
return allBooks;
Expand Down

0 comments on commit abfb827

Please sign in to comment.