Closed kwubbenhorst closed 8 months ago
Fix for first issue (no comments coming through for the conversations Craving more space and Religion and Work) is to change the key in the conversationSeeds.json file to “comments” for those last two (I had it as “responses”). With that change reseed data base and comments are coming through to the ConversationsList for all conversations.
"Other bug fixed by changing {fetchedConversation.title} to {fetchedConversation.conversationTitle} on l.35 of Conversation.jsx, and {fetchedConversation.conversationHeadText} to {fetchedConversation.conversationText} on l. 36. Now title and conversation head are coming thought to the view."
I think these conflicts:
server/models/Conversation.js server/schemas/resolvers.js server/schemas/typeDefs.js
should be mostly resolved from the above and only minimal tweaking is needed later on.
Added ConversationsList and Conversation files to components folder, worked on routing in App.js and main.js so they would be included and go to different endpoint for conditional rendering of the conversation view of the homepage. Added stylings to Header and Footer and integrated Navbar in Header so I could see the whole view of the homepage. Added a Home.jsx file to pages folder which takes in the ConversationsList component and the Conversation component. Added the data seeds which were included in my last, still pending, pull request. Started up both servers which required some changes to server.js, vite.config.js and package.jsons. Included queries in my code for ConversationsList, Conversation and Home components and that required some tweaks to existing models, typeDefs and resolvers files at the backend to get out the data that we needed and to make everything consistent. Currently it's a success that a. database is seeding, b. both servers are starting up (I added a script so you just have to enter npm run start-dev now to run the seeds and start both servers), c. data is getting through to ConversationsList, d. data is getting through to Conversation. Currently still trying to debug a few gaps in the data that we're getting (eg. comments for last two conversations in the seeds and conversation titles in the Conversation component). Next step is to work on the styling for the Conversation component, because it doesn't look very well at the moment.
What landing page now looks like in my browser:
What the view looks like on the homepage when I click one of the titles in the ConversationsList
The summary of new files I created and files in which I made changes
Note: don't forget to do another npm install before trying to run this code as new packages have been added and I find the new script useful npm run start-dev from the root directory to do everything: seed db, start fe and be server.