-
Notifications
You must be signed in to change notification settings - Fork 0
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
Adding prismic integration #58
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, left some questions and small suggestions
@@ -12,6 +12,8 @@ export default { | |||
}, | |||
boxShadow: { | |||
default: "8px 8px 0px 0px #4A4A51", | |||
button: "4px 4px 0px 0px #4A4A51", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a difference between button
and buttonlight
?
solution?: string; | ||
website_image?: string; | ||
link?: string; | ||
logo?: string | null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why | null
? If prismic returns null values by default ( i forgot if they do), then it would make sense for it to be either only string | null
or kept as string | undefined
and set to undefined wherever it is passed if it is null.
Side note: link?: string
directly translates to link: string | undefined
. docs
title: asText(project?.title), | ||
introduction: asText(project?.description), | ||
problem_statement: asText(project?.case_problem), | ||
solution: asText(project?.case_problem), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like you're using the ?? to default to undefined for some of the props, should we just default to it for all of them and keep the original case types?
|
||
const projectsList = projects.map((project) => ({ | ||
logo: asImageSrc(project.logo_image) ?? undefined, | ||
title: asText(project.title), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does asText
default to "" if the input is undefined?
subtitle: asText(project.subtitle), | ||
description: asText(project.description), | ||
has_case: project.has_case_study, | ||
link: `http://localhost:5173/case/${asText(project.title)}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you can pass in the route, so case/${stuff}
, and in the projects component you can use a Link
component with a to=case/${stuff}
. relevant docs
ℹ️ Issue
Closes #54 #45 #31 #39
📝 Description
Completed projects page and case study page
Briefly list the changes made to the code:
✔️ Verification
Made the changes and checked that the new content from Prismic was changing and updating with changes in Prismic
🏕️ (Optional) Future Work / Notes
Did you notice anything ugly during the course of this ticket? Any bugs, design challenges, or unexpected behavior? Write it down so we can clean it up in a future ticket!