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

fix: made the dataroom route protected in case user hasn't opted for any trial or plan #593

Closed

Conversation

nidhish-srivastava
Copy link
Contributor

Solution - Made a check of trial variable from usePlan() hook to see if its null or not,if its null,navigate the user back to /documents page

Copy link

vercel bot commented Sep 11, 2024

@nidhish-srivastava is attempting to deploy a commit to the mftsio Team on Vercel.

A member of the Team first needs to authorize it.

Comment on lines +42 to +44
useEffect(()=>{
if(trial == null) router.push('/documents')
},[trial])
Copy link
Owner

Choose a reason for hiding this comment

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

@nidhish-srivastava this might have unindented consequences.

for example it would push everyone who can view the datarooms page on a plan that supports it (business, datarooms) to be redirected to /documents because in their case trial == null is true

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes you are right

@github-actions github-actions bot locked and limited conversation to collaborators Sep 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants