You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: Currently userInfo is being passed to many children components under the <HomePage/> component. We can use Context for same to avoid prop drilling (if occurring anywhere now or in future)
also if we apply context on Router, It'll avoid Sign In on / (<LandingPage/>) even if user is signed in.
Snippet:
<div>{userInfo ? (<div><Navbarimgurl={userInfo.picture}email={userInfo.email}encryptionSecret={userInfo.encryption_secret}origin={url.containerOrigin}UUID={userInfo.uuid}/><motion.divinitial={{x: -1000}}animate={{x: 0}}transition={{duration: 0.5,ease: "easeOut"}}><Heroname={userInfo.name}uuid={userInfo.uuid}encryption_secret={userInfo.encryption_secret}/></motion.div><Tasksemail={userInfo.email}encryptionSecret={userInfo.encryption_secret}origin={url.containerOrigin}UUID={userInfo.uuid}/><SetupGuidename={userInfo.name}uuid={userInfo.uuid}encryption_secret={userInfo.encryption_secret}/><FAQ/><Footer/></div>) : (<div><p>Session has been expired.</p><p>Please to go back to the
<acolor="red"href={url.frontendURL}> home page </a>
and sign in again</p></div>)}</div>
The text was updated successfully, but these errors were encountered:
i had thought to implement this earlier, but i think that since we are using only one layer (HomePage.tsx -> all the other components, the prop drilling should not be an issue), also, context hook would make all the elements re-render once anything gets updated.
also if we apply context on Router, It'll avoid Sign In on / () even if user is signed in.
we probably do not need this as some user might be running multiple instances of the UI for different taskwarrior cli clients (or accounts, in this case), and auto-login might be an issue.
context hook would make all the elements re-render once anything gets updated.
Yes, It may be a problem with context.
But What if we want to have a different route for tasks. For now the tasks operations ar being done on /homebut if we want to have task editor on a seperate page the router context will help.
Module:
frontend
Description: Currently userInfo is being passed to many children components under the
<HomePage/>
component. We can use Context for same to avoid prop drilling (if occurring anywhere now or in future)also if we apply context on Router, It'll avoid Sign In on
/
(<LandingPage/>
) even if user is signed in.Snippet:
The text was updated successfully, but these errors were encountered: