-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add donate page top section #60
Conversation
✔️ Deploy Preview for orcahome ready! 🔨 Explore the source changes: 2535bea 🔍 Inspect the deploy log: https://app.netlify.com/sites/orcahome/deploys/6228c70ed12c7e000ade1773 😎 Browse the preview: https://deploy-preview-60--orcahome.netlify.app |
Since this PR is mostly identical to #56, let's get that one resolved first before tackling this one |
@paulcretu Now, I've used the |
package-lock.json
Outdated
@@ -6161,6 +6161,19 @@ | |||
"react-dom": "^15.5.4 || ^16.0.0 || ^17.0.0" | |||
} | |||
}, | |||
"node_modules/react-scroll": { |
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.
You can probably remove package-lock.json
from this PR
src/components/TopBanner.jsx
Outdated
@@ -67,17 +67,17 @@ const PageDesc = styled(Box)(({ theme }) => ({ | |||
}, | |||
})) | |||
|
|||
const TopBanner = ({ bannerImg, pageTitle, pageDesc }) => { | |||
const TopBanner = ({ bannerImg, pageTitle, pageDesc, isDonate }) => { |
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 understand what you're trying to do here with the isDonate
prop, but I think we should try to not add a page-specific prop like this. We want to be able to use the TopBanner
component on all the pages, so it wouldn't make sense to pass in a prop for each page—technically we could do it, it would work, but the logic would get really complicated.
Instead there are two options: If the pages are really this different, instead of adding a bunch of branching logic like this, it's just better to copy into a new component where maybe 90% of the code is the same. Then you can pull out any shared logic into smaller sub-components.
However, in this case, do these pages really need to be this different? Most of the differences here seem to be color and spacing tweaks. I would just simplify things (e.g. use the same background color on both). The current designs are just a rough guide, it's not worth adding in this much complexity to be pixel perfect. If there are any issues you run into that truly need to be different for the donate page, let me know and I can help
I'm just using the same component keeping the UI similar and have removed package-lock.json from this PR. |
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.
Looks good!
Resolves #51