8000 refactor: Refactor auth provider by BrunoQuaresma · Pull Request #5782 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

refactor: Refactor auth provider #5782

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

Merged
merged 18 commits into from
Jan 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update site/src/components/AuthProvider/AuthProvider.tsx
Co-authored-by: Joe Previte <jjprevite@gmail.com>
  • Loading branch information
BrunoQuaresma and jsjoeio authored Jan 19, 2023
commit e12f437ab893bf953163101709d7d89c2d124419
6 changes: 3 additions & 3 deletions site/src/components/AuthProvider/AuthProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export const AuthProvider: FC<PropsWithChildren> = ({ children }) => {
)
}

// The returned type is kinda complex to rewrite it
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types -- Read above
export const useAuth = () => {
type UseAuthReturnType = ReturnType<typeof useActor<AuthProviderContextValue["authService"]>>

export const useAuth = (): UseAuthReturnType => {
const context = useContext(AuthProviderContext)

if (!context) {
Expand Down
0