Skip to content

Commit

Permalink
chore: update bookmarks revalidation (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
suyalcinkaya authored Dec 11, 2024
1 parent 6a36a3f commit eb6206a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ No complicated licensing. Be kind and help others learn.
> You can use the same license with: https://github.com/superkhau/lice
```bash
npm install -g lice
lice -l onur_dev
$ npm install -g lice
$ lice -l onur_dev
```
3 changes: 0 additions & 3 deletions src/app/bookmarks/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ import { Toaster } from '@/components/ui/sonner'
import { getBookmarks } from '@/lib/raindrop'
import { sortByProperty } from '@/lib/utils'

// Revalidate all routes every 2 days
export const revalidate = 60 * 60 * 24 * 2 // 2 days

async function fetchData() {
const bookmarks = await getBookmarks()
const sortedBookmarks = sortByProperty(bookmarks, 'title')
Expand Down
3 changes: 3 additions & 0 deletions src/lib/raindrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ const options = {
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${process.env.NEXT_PUBLIC_RAINDROP_ACCESS_TOKEN}`
},
next: {
revalidate: 60 * 60 * 24 * 2 // 2 days
}
}

Expand Down

0 comments on commit eb6206a

Please sign in to comment.