Skip to content

Commit

Permalink
refactor: remove unnecessary things
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasio committed Aug 25, 2023
1 parent 7241c1e commit 689fa46
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 109 deletions.
12 changes: 2 additions & 10 deletions projects/wp-nextjs/src/pages/blog/[[...path]].js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ import { resolveBatch } from '../../utils/promises';
import { PageContent } from '../../components/PageContent';

const Archive = () => {
const { data, loading } = usePosts(blogParams.archive);

if (loading) {
return 'loading usePosts';
}
const { data } = usePosts(blogParams.archive);

return (
<>
Expand All @@ -43,11 +39,7 @@ const Archive = () => {
};

const BlogPage = () => {
const { isArchive, loading } = usePostOrPosts(blogParams);

if (loading) {
return 'Loading usePostOrPosts';
}
const { isArchive } = usePostOrPosts(blogParams);

if (isArchive) {
return <Archive />;
Expand Down
36 changes: 0 additions & 36 deletions projects/wp-nextjs/src/pages/book/[...path].js

This file was deleted.

50 changes: 0 additions & 50 deletions projects/wp-nextjs/src/pages/books/[[...path]].js

This file was deleted.

13 changes: 0 additions & 13 deletions projects/wp-nextjs/src/params.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,6 @@ export const blogParams = {
routeMatchStrategy: 'single',
};

// The params below are just for the custom post type routes example
// remove them if you don't need them

/**
* @type {import('@headstartwp/core').PostParams}
*/
export const bookParams = { postType: ['book'] };

/**
* @type {import('@headstartwp/core').PostsArchiveParams}
*/
export const booksParams = { postType: 'book' };

/**
* @type {import('@headstartwp/core').TaxonomyArchiveParams}
*/
Expand Down

0 comments on commit 689fa46

Please sign in to comment.