Remove unused prop
This commit is contained in:
@@ -86,7 +86,7 @@ const App: React.FC<AppProps> = ({ Component, pageProps }) => {
|
||||
<EnteSpinner />
|
||||
</Overlay>
|
||||
)}
|
||||
{showNavbar && <AppNavbar isMobile={isMobile} />}
|
||||
{showNavbar && <AppNavbar />}
|
||||
{isI18nReady && <Component {...pageProps} />}
|
||||
</AppContext.Provider>
|
||||
</ThemeProvider>
|
||||
|
||||
@@ -162,7 +162,7 @@ const App: React.FC<AppProps> = ({ Component, pageProps }) => {
|
||||
|
||||
<ThemeProvider theme={getTheme(themeColor, "auth")}>
|
||||
<CssBaseline enableColorScheme />
|
||||
{showNavbar && <AppNavbar isMobile={isMobile} />}
|
||||
{showNavbar && <AppNavbar />}
|
||||
<MessageContainer>
|
||||
{isI18nReady && offline && t("OFFLINE_MSG")}
|
||||
</MessageContainer>
|
||||
|
||||
@@ -141,10 +141,10 @@ const Page: React.FC = () => {
|
||||
export default Page;
|
||||
|
||||
const AuthNavbar: React.FC = () => {
|
||||
const { isMobile, logout } = ensure(useContext(AppContext));
|
||||
const { logout } = ensure(useContext(AppContext));
|
||||
|
||||
return (
|
||||
<NavbarBase isMobile={isMobile}>
|
||||
<NavbarBase>
|
||||
<HorizontalFlex flex={1} justifyContent={"center"}>
|
||||
<EnteLogo />
|
||||
</HorizontalFlex>
|
||||
|
||||
@@ -7,8 +7,6 @@ import { IconButton, Typography } from "@mui/material";
|
||||
import SearchBar from "components/Search/SearchBar";
|
||||
import UploadButton from "components/Upload/UploadButton";
|
||||
import { t } from "i18next";
|
||||
import { AppContext } from "pages/_app";
|
||||
import React from "react";
|
||||
import { Collection } from "types/collection";
|
||||
import { UpdateSearch } from "types/search";
|
||||
|
||||
@@ -35,12 +33,8 @@ export function GalleryNavbar({
|
||||
setIsInSearchMode,
|
||||
exitHiddenSection,
|
||||
}: Iprops) {
|
||||
const appContext = React.useContext(AppContext);
|
||||
return (
|
||||
<NavbarBase
|
||||
sx={{ background: "transparent", position: "absolute" }}
|
||||
isMobile={appContext.isMobile}
|
||||
>
|
||||
<NavbarBase sx={{ background: "transparent", position: "absolute" }}>
|
||||
{isInHiddenSection ? (
|
||||
<HorizontalFlex
|
||||
gap={"24px"}
|
||||
|
||||
@@ -4,14 +4,11 @@ import AddPhotoAlternateOutlined from "@mui/icons-material/AddPhotoAlternateOutl
|
||||
import { Box } from "@mui/material";
|
||||
import UploadButton from "components/Upload/UploadButton";
|
||||
import { t } from "i18next";
|
||||
import { AppContext } from "pages/_app";
|
||||
import { useContext } from "react";
|
||||
import GoToEnte from "./GoToEnte";
|
||||
|
||||
export default function SharedAlbumNavbar({ showUploadButton, openUploader }) {
|
||||
const { isMobile } = useContext(AppContext);
|
||||
return (
|
||||
<NavbarBase isMobile={isMobile}>
|
||||
<NavbarBase>
|
||||
<FluidContainer>
|
||||
<EnteLinkLogo />
|
||||
</FluidContainer>
|
||||
|
||||
@@ -342,7 +342,7 @@ export default function App({ Component, pageProps }: AppProps) {
|
||||
|
||||
<ThemeProvider theme={getTheme(themeColor, "photos")}>
|
||||
<CssBaseline enableColorScheme />
|
||||
{showNavbar && <AppNavbar isMobile={isMobile} />}
|
||||
{showNavbar && <AppNavbar />}
|
||||
<MessageContainer>
|
||||
{isI18nReady && offline && t("OFFLINE_MSG")}
|
||||
</MessageContainer>
|
||||
|
||||
@@ -3,13 +3,9 @@ import { CenteredFlex } from "../../components/Container";
|
||||
import { EnteLogo } from "../EnteLogo";
|
||||
import NavbarBase from "./base";
|
||||
|
||||
interface AppNavbarProps {
|
||||
isMobile: boolean;
|
||||
}
|
||||
|
||||
export const AppNavbar: React.FC<AppNavbarProps> = ({ isMobile }) => {
|
||||
export const AppNavbar: React.FC = () => {
|
||||
return (
|
||||
<NavbarBase isMobile={isMobile}>
|
||||
<NavbarBase>
|
||||
<CenteredFlex>
|
||||
<EnteLogo />
|
||||
</CenteredFlex>
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import { styled } from "@mui/material";
|
||||
import { FlexWrapper } from "../../components/Container";
|
||||
|
||||
const NavbarBase = styled(FlexWrapper, {
|
||||
shouldForwardProp: (propName) => propName != "isMobile",
|
||||
})<{ isMobile: boolean }>`
|
||||
const NavbarBase = styled(FlexWrapper)`
|
||||
min-height: 64px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
|
||||
Reference in New Issue
Block a user