-
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
6 Render a project board with columns and tasks #29
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
<Project | ||
key={project.id} | ||
title={project.title} | ||
onClick={() => setSelectedProject(project)} |
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 this work?
import Column from "../Column/Column"; | ||
import Task from "../Task/Task"; | ||
|
||
function ProjectBoard({ selectedProject }) { |
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.
So overall I see what you're doing and this is great! I wonder if we should really be manipulating GS for the selected project though? I'm sure I'm the one that originally had projects being passed down as props
function ProjectBoard({ selectedProject }) { | ||
const user = useSelector((state) => state.user.user); | ||
|
||
const projectTasks = selectedProject ? selectedProject.tasks : []; |
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 had to do this because GS is not cognizant of what the selected project is
return ( | ||
<> | ||
<div className="flex flex-col w-10/12"> | ||
{selectedProject ? <p>{selectedProject.title}</p> : <p>No project selected</p>} |
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.
sick
Summary:
This adds a ProjectBoard component that based on a selected project, it will render the proper project tasks into 3 columns: Backlog, Doing, and Done
Type of change
Checklist: