Skip to content

Commit

Permalink
Merge branch 'master' into styling-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
joyc7 committed Dec 7, 2023
2 parents 01735a1 + 9e237f2 commit 267476e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions front-end/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="icon" href="%PUBLIC_URL%/logo.png" type="image/png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
Expand All @@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>Bill Balancer</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
Binary file added front-end/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions front-end/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,13 @@ function App() {
// dark mode should not affect Login and ForgotPassword page
function AppContainer({ isDarkMode, children }) {
const location = useLocation();
// check if the current route is either the login page or the forgot password page
// check if the current route is the login page, the forgot password page, or the signup page
const isLoginPage = location.pathname === "/";
const isForgotPasswordPage = location.pathname === "/forgot-password";
// disable dark mode on Login and ForgotPassword page
const isSignupPage = location.pathname === "/signup";
// disable dark mode on Login, ForgotPassword, and Signup page
const containerClass =
isDarkMode && !isLoginPage && !isForgotPasswordPage
isDarkMode && !isLoginPage && !isForgotPasswordPage && !isSignupPage
? "container dark-mode"
: "container";
return <div className={containerClass}>{children}</div>;
Expand Down

0 comments on commit 267476e

Please sign in to comment.