-
Notifications
You must be signed in to change notification settings - Fork 14
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
Created sidebar, links hidden when user is signed out #149
Conversation
> > Co-authored by: Hannah McGowan <[email protected]
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.
Please also address the lint warnings in this PR
children: React.ReactNode; | ||
} | ||
const NavBar: React.FC<Props> = ({ children }) => { | ||
const { data: me } = trpc.user.getMe.useQuery(); |
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.
While sitting on the sign in page, a 401: Unauthorized error
toast pops up because its trying to use getMe without being logged in. Is there a way to prevent this? I think one possibility is to create a new backend procedure for this.
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.
Currently investigating our options
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.
We can create a separate issue for this, in the spirit of faster and smaller PRs.
src/pages/settings.tsx
Outdated
@@ -0,0 +1,11 @@ | |||
import React from "react"; | |||
|
|||
const settings = () => { |
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.
We recently made the change to make sure all components are PascalCased, so please capitalize first letters.
src/pages/staff/index.tsx
Outdated
import styles from "../../styles/Dashboard.module.css"; | ||
import MyParas from "@/components/case_manager/MyParas"; | ||
|
||
function staff() { |
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.
ditto
src/pages/students/index.tsx
Outdated
|
||
function cmDashboard() { | ||
function students() { |
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.
ditto
<Logout className={styles.icon} /> | ||
<p | ||
className={styles.linkTitle} | ||
onClick={() => signOut({ callbackUrl: "/" })} |
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.
Why is this on a p tag inside a link? Can the Link just be a button instead?
* Created sidebar, links hidden when user is signed out > > Co-authored by: Hannah McGowan <[email protected] * added links to student and para tables, settings page under construction * redirect to students page upon login * updated table title * ran prettier on navbar styles * added type to Navbar props * resolved all issues except 401 error, fixed linting * removed React.FC, updated prop type * Pascal Casing * updated component exports * Fixed export casing
Co-authored by: Hannah McGowan [email protected]