Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mnvr committed Jun 11, 2024
1 parent 48fc966 commit 25f2fc4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
2 changes: 0 additions & 2 deletions web/apps/accounts/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ module.exports = {
ignorePatterns: ["next.config.js", "next-env.d.ts"],
/* TODO: Temporary overrides */
rules: {
"react/react-in-jsx-scope": "off",
"react-hooks/exhaustive-deps": "off",
"@typescript-eslint/no-explicit-any": "off",
"react-refresh/only-export-components": "off",
},
};
8 changes: 5 additions & 3 deletions web/apps/accounts/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { ThemeProvider } from "@mui/material/styles";
import { t } from "i18next";
import type { AppProps } from "next/app";
import { useRouter } from "next/router";
import { createContext, useContext, useEffect, useState } from "react";
import React, { createContext, useContext, useEffect, useState } from "react";
import "styles/global.css";

/** The accounts app has no extra properties on top of the base context. */
Expand All @@ -31,7 +31,7 @@ export const AppContext = createContext<AppContextT | undefined>(undefined);
/** Utility hook to reduce amount of boilerplate in account related pages. */
export const useAppContext = () => ensure(useContext(AppContext));

export default function App({ Component, pageProps }: AppProps) {
const App: React.FC<AppProps> = ({ Component, pageProps }) => {
const appName: AppName = "accounts";

const [isI18nReady, setIsI18nReady] = useState<boolean>(false);
Expand Down Expand Up @@ -115,4 +115,6 @@ export default function App({ Component, pageProps }: AppProps) {
</ThemeProvider>
</>
);
}
};

export default App;
14 changes: 11 additions & 3 deletions web/apps/auth/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ import { ThemeProvider } from "@mui/material/styles";
import { t } from "i18next";
import type { AppProps } from "next/app";
import { useRouter } from "next/router";
import { createContext, useContext, useEffect, useRef, useState } from "react";
import React, {
createContext,
useContext,
useEffect,
useRef,
useState,
} from "react";
import LoadingBar, { type LoadingBarRef } from "react-top-loading-bar";
import "../../public/css/global.css";

Expand All @@ -52,7 +58,7 @@ export const AppContext = createContext<AppContextT | undefined>(undefined);
/** Utility hook to reduce amount of boilerplate in account related pages. */
export const useAppContext = () => ensure(useContext(AppContext));

export default function App({ Component, pageProps }: AppProps) {
const App: React.FC<AppProps> = ({ Component, pageProps }) => {
const appName: AppName = "auth";

const router = useRouter();
Expand Down Expand Up @@ -198,4 +204,6 @@ export default function App({ Component, pageProps }: AppProps) {
</ThemeProvider>
</>
);
}
};

export default App;

0 comments on commit 25f2fc4

Please sign in to comment.