Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/items/[uuid]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ function formatItemBreadcrumbs(item: ItemModel) {
}

export default async function ItemViewer({ params, searchParams }: ItemProps) {
revalidatePath("/");
console.log("params are: ", params);
const [citationsData, itemData] = await Promise.all([
CollectionsApi.getCitationsData(params.uuid),
Expand Down
4 changes: 2 additions & 2 deletions app/src/utils/apiClients/apiClients.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class CollectionsApi {
const apiUrl = `${process.env.COLLECTIONS_API_URL}/items/${uuid}/citations`;
return await fetchApi({
apiUrl: apiUrl,
options: { isRepoApi: false },
options: { isRepoApi: false, cache: "no-store" },
});
}

Expand Down Expand Up @@ -160,7 +160,7 @@ export class CollectionsApi {
): Promise<APIItem> {
return await fetchApi({
apiUrl: `${process.env.COLLECTIONS_API_URL}/items/${uuid}`,
options: { isRepoApi: false, clientIP: clientIP },
options: { isRepoApi: false, clientIP: clientIP, cache: "no-store" },
});
}

Expand Down
2 changes: 2 additions & 0 deletions app/src/utils/fetchApi/fetchApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const fetchApi = async ({
clientIP?: string | null;
isRepoApi?: boolean;
next?;
cache?: string;
};
}) => {
const {
Expand All @@ -34,6 +35,7 @@ export const fetchApi = async ({
clientIP = null,
isRepoApi = true,
next,
cache = "force-cache",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note - I set this as the default since this is the default in nextJS 14 per the docs

} = options;

const headers: Record<string, string> = {};
Expand Down
6 changes: 6 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ const nextConfig = {
// the modules that newrelic supports should not be mangled by webpack. Thus,
// we need to "externalize" all of the modules that newrelic supports.

logging: {
fetches: {
fullUrl: true,
},
},
Comment on lines +43 to +47
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this utility only runs in dev mode, but is handy to see when data is actually being fetched


webpack: (config) => {
if (process.env.NEW_RELIC_APP_NAME) {
nrExternals(config);
Expand Down