Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditions between portraits and prints #8

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

Billson7
Copy link
Owner

No description provided.

@Billson7 Billson7 changed the base branch from master to develop January 20, 2021 16:40

return {
props: {
posts
posts,
prints
Copy link
Owner Author

Choose a reason for hiding this comment

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

Remove

@@ -101,11 +123,13 @@ export async function getStaticPaths() {
}

export async function getStaticProps({ params }) {
const posts = await client.getByUID("portraits", `${params.uid}`);
const posts = (await client.getByUID("portraits", `${params.uid}`)) || null;
const prints = (await client.getByUID("prints", `${params.uid}`)) || null;
Copy link
Owner Author

Choose a reason for hiding this comment

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

Remove

@@ -90,7 +112,7 @@ export default Product;

export async function getStaticPaths() {
const res = await client.query(
Prismic.Predicates.at("document.type", "portraits"),
Prismic.Predicates.at("document.type", "portraits" || "prints"),
Copy link
Owner Author

@Billson7 Billson7 Mar 10, 2021

Choose a reason for hiding this comment

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

Remove and conditionals to print

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant