diff --git a/.husky/commit-msg b/.husky/commit-msg index b56767669..42a70e424 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1,4 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -npx --no -- commitlint --edit "$1" +npx --no -- commitlint --edit "$1" \ No newline at end of file diff --git a/src/App.jsx b/src/App.jsx index c65c3f516..6538a3ccd 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,11 +1,4 @@ -import "./index.css"; - import { Darkmode, ErrorBoundary } from "./reusableComponents"; -import { - DeleteAccount, - SettingsSidebar, - SoundSetting, -} from "./components/SettingsComponents"; import { Outlet, Route, Routes, useNavigate } from "react-router-dom"; import React, { useEffect, useState } from "react"; @@ -36,6 +29,15 @@ const HelpCenter = React.lazy(() => import("./pages/FooterPages/HelpCenter")); const Notifications = React.lazy(() => import("./components/Notification")); const SideBar = React.lazy(() => import("./components/SideBar")); const Navbar = React.lazy(() => import("./components/Navbar")); +const DeleteAccount = React.lazy( + () => import("./components/SettingsComponents/DeleteAccount"), +); +const SettingsSidebar = React.lazy( + () => import("./components/SettingsComponents/Sidebar"), +); +const SoundSetting = React.lazy( + () => import("./components/SettingsComponents/Sounds"), +); export function getModalStyle() { const top = 0; @@ -68,7 +70,7 @@ export const useStyles = makeStyles((theme) => ({ }, })); -function App() { +export default function App() { const [user, setUser] = useState(null); const [rowMode, setRowMode] = useState(false); @@ -299,8 +301,6 @@ function App() { ); } -export default App; - function Wrapper({ user, setUser, setRowMode }) { const [showScroll, setShowScroll] = useState(false); const scrollTop = () => { diff --git a/src/components/Navbar/index.css b/src/components/Navbar/index.css index a89c163a5..eaba736b8 100644 --- a/src/components/Navbar/index.css +++ b/src/components/Navbar/index.css @@ -152,6 +152,7 @@ .search_icon { margin-left: auto; + margin-right: -10px; transform: scale(1.3); border-radius: 50%; padding: 6px; diff --git a/src/components/SideBar/index.jsx b/src/components/SideBar/index.jsx index 7cf3cabb1..39a756aa2 100644 --- a/src/components/SideBar/index.jsx +++ b/src/components/SideBar/index.jsx @@ -15,7 +15,6 @@ import { getModalStyle, useStyles } from "../../App"; import { useLocation, useNavigate } from "react-router-dom"; import { AiOutlineClose } from "react-icons/ai"; -import ImgUpload from "../ImgUpload"; import { auth } from "../../lib/firebase"; import blankImg from "../../assets/blank-profile.webp"; import getUserSessionData from "../../js/userData"; @@ -23,6 +22,7 @@ import { playSuccessSound } from "../../js/sounds"; import { useSnackbar } from "notistack"; const Footer = React.lazy(() => import("./Footer")); +const ImgUpload = React.lazy(() => import("../ImgUpload")); function SideBar() { const classes = useStyles(); diff --git a/src/pages/Profile/index.jsx b/src/pages/Profile/index.jsx index f53ffa016..79f1f1793 100644 --- a/src/pages/Profile/index.jsx +++ b/src/pages/Profile/index.jsx @@ -1,7 +1,6 @@ import "./index.css"; import { Avatar, Box, Button, Typography } from "@mui/material"; -import { EditProfile, StoryView } from "../../components"; import { ErrorBoundary, Loader, ViewsCounter } from "../../reusableComponents"; import { Link, useNavigate, useParams } from "react-router-dom"; import { auth, db, storage } from "../../lib/firebase"; @@ -33,6 +32,8 @@ import { setUserSessionData } from "../../js/userData"; import { useSnackbar } from "notistack"; const SideBar = lazy(() => import("../../components/SideBar")); +const EditProfile = lazy(() => import("../../components/EditProfile")); +const StoryView = lazy(() => import("../../components/Story")); function Profile() { const navigate = useNavigate(); diff --git a/src/reusableComponents/Auth/index.css b/src/reusableComponents/Auth/index.css index f87c7c6e4..498cc2495 100644 --- a/src/reusableComponents/Auth/index.css +++ b/src/reusableComponents/Auth/index.css @@ -1,5 +1,4 @@ .login__right__container { - height: 100vh; position: relative; }