Skip to content

Commit

Permalink
fix: remove unnecessary cache headers
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasio committed Jun 28, 2024
1 parent a7eebf7 commit 96a5c2f
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 24 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/data/fetchFn/fetchPost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export async function fetchPost<
};

return {
data: { post, pageInfo: data.pageInfo, queriedObject: data.queriedObject },
data: { post },
isMainQuery,
};
}
Expand Down
3 changes: 0 additions & 3 deletions projects/wp-nextjs-app/src/app/(single)/[...path]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import { HeadstartWPRoute, queryPost } from '@headstartwp/next/app';
const Single = async ({ params }: HeadstartWPRoute) => {
const { data } = await queryPost({
routeParams: params,
params: {
matchCurrentPath: false,
},
});

return (
Expand Down
5 changes: 0 additions & 5 deletions projects/wp-nextjs-app/src/app/author/[...path]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ import Link from 'next/link';
const AuthorArchive = async ({ params }: HeadstartWPRoute) => {
const { data } = await queryAuthorArchive({
routeParams: params,
options: {
headers: {
cache: 'no-store',
},
},
});

return (
Expand Down
5 changes: 0 additions & 5 deletions projects/wp-nextjs-app/src/app/category/[...path]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ const CategoryArchive = async ({ params }: HeadstartWPRoute) => {
params: {
taxonomy: 'category',
},
options: {
headers: {
cache: 'no-store',
},
},
});

return (
Expand Down
5 changes: 0 additions & 5 deletions projects/wp-nextjs-app/src/app/search/[[...path]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ import Link from 'next/link';
const Search = async ({ params }: HeadstartWPRoute) => {
const { data } = await querySearch({
routeParams: params,
options: {
headers: {
cache: 'no-store',
},
},
});

if (data.pageInfo.totalItems === 0) {
Expand Down
5 changes: 0 additions & 5 deletions projects/wp-nextjs-app/src/app/tag/[...path]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ const TagArchive = async ({ params }: HeadstartWPRoute) => {
params: {
taxonomy: 'post_tag',
},
options: {
headers: {
cache: 'no-store',
},
},
});

return (
Expand Down

0 comments on commit 96a5c2f

Please sign in to comment.