Skip to content

Commit

Permalink
refactor: updated status bar deps and synced with android
Browse files Browse the repository at this point in the history
  • Loading branch information
homocodian committed Mar 11, 2023
1 parent 52ff9d7 commit 6b06b14
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 44 deletions.
55 changes: 26 additions & 29 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import { useMemo } from "react";

import loadable from "@loadable/component";
import { Capacitor } from "@capacitor/core";
import { Routes, Route } from "react-router-dom";
import { useTernaryDarkMode } from "usehooks-ts";
import { createTheme, ThemeProvider } from "@mui/material/styles";
import { Capacitor } from "@capacitor/core";
import { StatusBar, Style } from "@capacitor/status-bar";
import loadable from "@loadable/component";
import { createTheme, ThemeProvider } from "@mui/material/styles";

import Seperator from "./components/Seperator";
import Loading from "./components/Loading";
import { PrivateRoute, MenuAppBar } from "./components";
import { getDesignTokens } from "./utils/getDesignToken";
import { AccountMenuProvider, DrawerProvider } from "./context";
import NotesCategoryProvider from "./context/NotesCategoryProvider";
import Loading from "./components/Loading";

const HomePage = loadable(() => import("./pages/Home"));
const SignInPage = loadable(() => import("./pages/SignIn"));
Expand Down Expand Up @@ -47,30 +46,28 @@ function App() {
<DrawerProvider>
<AccountMenuProvider>
<MenuAppBar />
<Seperator>
<Routes>
<Route path="/">
<Route
index
element={
<PrivateRoute>
<NotesCategoryProvider>
<HomePage fallback={<Loading />} />
</NotesCategoryProvider>
</PrivateRoute>
}
/>
<Route
path="signup"
element={<SignUpPage fallback={<Loading />} />}
/>
<Route
path="login"
element={<SignInPage fallback={<Loading />} />}
/>
</Route>
</Routes>
</Seperator>
<Routes>
<Route path="/">
<Route
index
element={
<PrivateRoute>
<NotesCategoryProvider>
<HomePage fallback={<Loading />} />
</NotesCategoryProvider>
</PrivateRoute>
}
/>
<Route
path="signup"
element={<SignUpPage fallback={<Loading />} />}
/>
<Route
path="login"
element={<SignInPage fallback={<Loading />} />}
/>
</Route>
</Routes>
</AccountMenuProvider>
</DrawerProvider>
</ThemeProvider>
Expand Down
2 changes: 1 addition & 1 deletion src/components/MenuAppBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function MenuAppBar() {
const { isDrawerOpen, setDrawerIsOpen } = useDrawer();

return (
<Box sx={{ flexGrow: 1 }}>
<Box sx={{ flexGrow: 1, paddingBottom: "70px" }}>
<AppBar position="fixed">
<Toolbar>
{user && (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Seperator.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function Seperator(props: { children: React.ReactNode }) {
return <div style={{ marginTop: "70px" }}>{props.children}</div>;
return <div style={{ paddingTop: "70px" }}>{props.children}</div>;
}

export default Seperator;
25 changes: 15 additions & 10 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;700&display=swap");

body {
margin: 0;
padding: 0;
box-sizing: border-box;
margin: 0;
padding: 0;
box-sizing: border-box;
height: 100vh;
}

#root {
height: 100vh;
}

.container {
display: grid;
place-items: center;
width: 100%;
height: 100vh;
background: #000000;
display: grid;
place-items: center;
width: 100%;
height: 100vh;
background: #000000;
}

.animation-container {
background: #000000;
max-width: 512px;
background: #000000;
max-width: 512px;
}
4 changes: 2 additions & 2 deletions src/pages/SignIn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default function SignIn() {
<Container component="main" maxWidth="xs">
<Box
sx={{
marginTop: 3,
paddingTop: 3,
display: "flex",
flexDirection: "column",
alignItems: "center",
Expand Down Expand Up @@ -203,7 +203,7 @@ export default function SignIn() {
Continue With Google
</Button>
)}
<Grid container>
<Grid container sx={{ mt: 2 }}>
<Grid item xs>
<Link
href="#"
Expand Down
2 changes: 1 addition & 1 deletion src/pages/SignUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ export default function SignUp() {
</Button>
)}
<Grid container>
<Grid item>
<Grid item sx={{ mt: 2 }}>
<Link href="/login" variant="body2">
{"Already have an account? Sign In"}
</Link>
Expand Down

0 comments on commit 6b06b14

Please sign in to comment.