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

Milestone 3A Aidan Nesbitt #157

Closed
wants to merge 121 commits into from
Closed

Conversation

ajesus7
Copy link

@ajesus7 ajesus7 commented Nov 30, 2023

Developer: Aidan Nesbitt

Closes #110

Pull Request Summary

Created a MongoDB Atlas database to store data that will be displayed on my website (blog Posts and portfolio content). Added a connectDB function that connects to the using my URL. Created getBlogs() and getPortfolios() functions that connect to the database with the connectDB function and retrieve blogs and portfolio (entries? objects? data points?) respectively. Call getBlogs() and getPortfolios() with await at top of each page's Home component, and then render their data within the returned HTML if the data request was successful. Implemented a check for each page (blogs and portfolios) that checks if the blogPosts/portfolios variable is not null and has a length greater than 0, and generates the content within the page if those conditions are met. If those conditions are not met, and the blogPosts/portfolios variable is null, then create a div with a nested paragraph on each page that says, "There was an error...". Also created blogSchema and portfolioSchema files for handling the data retrieved from the database.

Note:
There are hydration errors occurring on my portfolio page, and the error says it may have to do with head and HTML but I'm not entirely sure how to fix it – I couldn't find a solution on StackOverflow or ChatGPT just yet. I found that hydration errors can occur if you improperly situate HTML tags (such as with nested a paragraph within another paragraph), and I think that this error might be occurring with the way that I am generating the dynamic content (but don't know how to fix).

Special Instructions (optional)

Pull Request Checklist

  • [] Code is neat, readable, and works
  • [] Comments are appropriate
  • [] The commit messages follows our guidelines
  • The developer name is specified
  • The summary is completed
  • Ask for a review in communication channels

Screenshots/Screencast

…, added navbar to layout.tsx - having issue with hydration for Resume page
…ly display associated information and link to correct pages
… up on the BlogPreview, with the blogs fetched from the database
…curring on portfolio page but have not solved yet
…rate title of the page (I assume I will update this more elegantly later)
@jlaksana
Copy link
Collaborator

jlaksana commented Dec 6, 2023

MongoDB "entries" are called documents

Copy link
Collaborator

@jlaksana jlaksana left a comment

Choose a reason for hiding this comment

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

Looks good. Proceed to 3B!

bootcamp-milestone-2/src/lib/getBlogs.ts Show resolved Hide resolved
@ajesus7 ajesus7 closed this Dec 18, 2023
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.

Milestone 3A - Creating The Backend
2 participants