-
Notifications
You must be signed in to change notification settings - Fork 90
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
Create a secret route #279
Conversation
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.
Hi, thanks for your contribution. I have some comments.
@@ -4,6 +4,7 @@ | |||
/node_modules | |||
/.pnp | |||
.pnp.js | |||
*package-lock.json |
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 should remove this line from here, and use 'yarn' instead of 'npm'.
import React from 'react' | ||
import { Navigate } from 'react-router-dom'; | ||
|
||
const ProtectedRoute = ({children}:any) => { |
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.
Hmm, we don't have authentication on the site so we don't need a Protected Route, the option to get to this page will be through "hidden secret egg" as the storybook.
Please, follow the instructions that were specified in the issue.
@NoamGaash can we close this pr? @Haim-S your contribution is very appreciated even though it wasn't as requested because some misunderstanding. You are welcome to take another issue :) |
@Haim-S @ArkadiK94 it's inactive for a couple of weeks now, I believe it can be closed. |
Thank you for the opportunity to contribute to your open source, I would
really like to understand where I can contribute and what you would really
like, if there is a meeting on Discord then I would love to join and keep
me updated, thanks.
בתאריך שבת, 16 בדצמ׳ 2023 ב-11:52 מאת NoamGaash <
***@***.***>:
… Closed #279 <#279>.
—
Reply to this email directly, view it on GitHub
<#279 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZBP3DEIHSEO4KHVZZJTPPDYJVVPXAVCNFSM6AAAAABAHLXRFSVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJRGI3DKNBVGUYDQOI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I added an isProtected key to the array of paths, which checks which path needs protection.
And then, I built in the route tag, a condition that checks if it's protected, then it doesn't go through, and if so, then it goes through.
Hope you liked it, this is my first open source contribution.