Skip to content

Commit

Permalink
cache bookmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
ap-justin committed Oct 16, 2024
1 parent 5b170ba commit c4b2a87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,9 @@ const rootRoutes: RO[] = [
export const routes: RO[] = [
{
id: "root",
path: "/",
element: <RootLayout />,
shouldRevalidate: ({ currentUrl }) =>
currentUrl.pathname === appRoutes.home ||
currentUrl.pathname === "/logout",

loader: rootLoader,
children: rootRoutes,
ErrorBoundary: RouterErrorBoundary,
Expand Down
2 changes: 1 addition & 1 deletion src/App/root-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async function getBookmarks(user: UserV2): Promise<EndowmentBookmark[]> {
const req = new Request(source);
req.headers.set("authorization", user.idToken);

const res = await fetch(req);
const res = await cacheGet(req);
if (!res.ok) return [];

const endows: number[] = await res.json();
Expand Down

0 comments on commit c4b2a87

Please sign in to comment.