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

Hide signup/signin pages from authenticated user, redirect to / if accessed #343

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Brikaa
Copy link

@Brikaa Brikaa commented Feb 13, 2022

I didn't use useEffect() here since I didn't find a need to render the sign-in/sign-up page before the check. Returning null will not render anything.

@Brikaa Brikaa requested a review from a team as a code owner February 13, 2022 15:27
@Brikaa
Copy link
Author

Brikaa commented Feb 14, 2022

We could consider redirecting to /projects if an authorized user accesses /

@codecov
Copy link

codecov bot commented Mar 11, 2022

Codecov Report

Merging #343 (845c9f5) into master (2cac0fd) will increase coverage by 0.33%.
The diff coverage is 20.00%.

❗ Current head 845c9f5 differs from pull request most recent head fe24578. Consider uploading reports for the commit fe24578 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #343      +/-   ##
==========================================
+ Coverage   60.87%   61.21%   +0.33%     
==========================================
  Files         126      126              
  Lines        1958     2202     +244     
  Branches      380      534     +154     
==========================================
+ Hits         1192     1348     +156     
- Misses        731      848     +117     
+ Partials       35        6      -29     
Impacted Files Coverage Δ
src/helpers/user-auth-helper.ts 56.25% <0.00%> (-29.47%) ⬇️
src/pages/signin.tsx 0.00% <0.00%> (ø)
src/pages/signup.tsx 0.00% <0.00%> (ø)
src/components/index-page/hero.tsx 95.23% <75.00%> (-4.77%) ⬇️
src/components/shared/buttons/project-button.tsx 20.00% <0.00%> (-13.34%) ⬇️
src/components/shared/page/page-body.tsx 87.50% <0.00%> (-12.50%) ⬇️
src/components/account/account-settings.tsx 78.94% <0.00%> (-7.72%) ⬇️
src/components/shared/form/controls2.tsx 36.84% <0.00%> (-6.91%) ⬇️
src/components/shared/social-icon.tsx 26.66% <0.00%> (-6.67%) ⬇️
src/components/shared/seo.tsx 89.47% <0.00%> (-4.28%) ⬇️
... and 55 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2cac0fd...fe24578. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant