mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 08:14:06 +00:00
Add eslint rule and fix as many issues as possible
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { ReactNode, useEffect } from 'react';
|
||||
import { useRouter } from 'next/router';
|
||||
import { ReactNode, useEffect } from "react";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
import { publicPaths } from '@app/const';
|
||||
import { useToggle } from '@app/hooks';
|
||||
import { useGetAuthToken } from '@app/hooks/api';
|
||||
import { isLoggedIn } from '@app/reactQuery';
|
||||
import { publicPaths } from "@app/const";
|
||||
import { useToggle } from "@app/hooks";
|
||||
import { useGetAuthToken } from "@app/hooks/api";
|
||||
import { isLoggedIn } from "@app/reactQuery";
|
||||
|
||||
type Props = {
|
||||
children: ReactNode;
|
||||
@@ -26,7 +26,7 @@ export const AuthProvider = ({ children }: Props): JSX.Element => {
|
||||
if (!isLoading) {
|
||||
// not a public path and not authenticated kick to login page
|
||||
if (!publicPaths.includes(pathname) && !isLoggedIn()) {
|
||||
push('/login').then(() => {
|
||||
push("/login").then(() => {
|
||||
setIsReady.on();
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -1 +1 @@
|
||||
export { AuthProvider } from './AuthContext';
|
||||
export { AuthProvider } from "./AuthContext";
|
||||
|
||||
Reference in New Issue
Block a user