-
Notifications
You must be signed in to change notification settings - Fork 135
[FEAT] Create Team CTA #539
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
Conversation
Hey @e-for-eshaan Can you Please take a look ? |
showCreate.true(); | ||
router.replace(router.pathname, ''); | ||
} | ||
}, [router, router.query.create, showCreate]); |
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.
see, you only need to showCreate.true
in your dependency array, but my guess is linter asked you to add the entire showCreate
object.
- instead of calling
showCreate.true()
, usedepFn(showCreate, true)
, - update the dependency array to include
showCreate.true
, instead ofshowCreate
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.
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.
Understood
'We getting your teams together, but someone seems missing 🤔' | ||
)} | ||
</Scrollbar> | ||
{apiTeams.length && ( |
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.
if teams don't exists (length==0), then we DEFINITELY need to ask them to create teams
although, we already have reroutes in place that redirect to teams page, but still, your check is redundant
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.
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.
oh, well i missed that. great, keep the current condition,
don't add direct numbers as conditional checks
apiTeams.length
would render a 0
on false
can convert to Boolean(apiTeams.length)
what you said {apiTeams.length > 0 && ( BUTTON) }
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.
Understood
Hey, @e-for-eshaan Looks Good now? |
Hey @e-for-eshaan I have also solved #537 in this PR |
yes this happens when consuming the response from dispatch pomise. (res: any) => {
if(res.meta.requestStatus !== 'rejected')
/*...your code...*/
} |
Hey @e-for-eshaan You mean to handle this call inside |
we typecast it to (res: any) => {} that's what i was referring to in previous comment |
okay so we are not sure about the response type here understood |
@e-for-eshaan I have made the changes and here I didn't use the |
cool, i want you to check for data now
and are they the same type of object? does it need any more/fewer keys? |
Sure Let me check last time I check it was same but lets see how it's different from other case |
@e-for-eshaan This is what we get when we use the selector to update team this is what we get from the response team I don't think |
also you can checkout complete working in the updated video above |
@e-for-eshaan Please take a look let me know if anything else left to do |
it's not okay to assign How to approach this?
|
feel free to ask more questions! |
|
Awesome I was doing the same thing last night I basically tried different ways thanks for suggestion @e-for-eshaan I will make suggested changes. |
Have a look @e-for-eshaan |
)} | ||
</Scrollbar> | ||
{Boolean(apiTeams.length) && ( | ||
<FlexBox marginTop={'10px'}> |
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.
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.
Sure
{Boolean(apiTeams.length) && ( | ||
<FlexBox marginTop={'10px'}> | ||
<Button fullWidth variant="outlined" onClick={addTeam}> | ||
<FlexBox> |
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.
centered
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.
got it
const singleTeam = teams.find( | ||
(team: Team) => team.id === createdTeam.id | ||
); | ||
dispatch(appSlice.actions.setSingleTeam([singleTeam])); |
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.
this check will never fail, but still,
if(singleTeam)
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.
Got it
Have a Look @e-for-eshaan |
Can you update the final video? |
Updated |
Good stuff, approving! 🎉 |
Thanks man 😊 🔥 |
Can we get this merged? |
Linked Issue(s)
#529
#537
Acceptance Criteria fulfillment
Proposed changes (including videos or screenshots)
Screencast.from.2024-09-09.13-24-32.webm