From 10e5018f94b9f798d17721beacbf7e28e6d10696 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Tue, 8 Oct 2024 20:13:29 +0530 Subject: [PATCH] Colocate --- web/apps/photos/src/components/EnteLogo.tsx | 14 -------------- web/apps/photos/src/pages/shared-albums.tsx | 4 ++-- web/packages/base/components/EnteLogo.tsx | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+), 16 deletions(-) delete mode 100644 web/apps/photos/src/components/EnteLogo.tsx diff --git a/web/apps/photos/src/components/EnteLogo.tsx b/web/apps/photos/src/components/EnteLogo.tsx deleted file mode 100644 index 6636631467..0000000000 --- a/web/apps/photos/src/components/EnteLogo.tsx +++ /dev/null @@ -1,14 +0,0 @@ -/** - * The Ente logo ("ente" in Montserrat), as an inline svg. - */ -export const EnteLogo: React.FC = () => ( - - - -); diff --git a/web/apps/photos/src/pages/shared-albums.tsx b/web/apps/photos/src/pages/shared-albums.tsx index fdd176e9bc..d5a6185dfa 100644 --- a/web/apps/photos/src/pages/shared-albums.tsx +++ b/web/apps/photos/src/pages/shared-albums.tsx @@ -1,3 +1,4 @@ +import { EnteLogoSvg } from "@/base/components/EnteLogo"; import { ActivityIndicator } from "@/base/components/mui/ActivityIndicator"; import { NavbarBase, SelectionBar } from "@/base/components/Navbar"; import { sharedCryptoWorker } from "@/base/crypto"; @@ -37,7 +38,6 @@ import type { ButtonProps, IconButtonProps } from "@mui/material"; import { Box, Button, IconButton, Stack, Tooltip } from "@mui/material"; import Typography from "@mui/material/Typography"; import bs58 from "bs58"; -import { EnteLogo } from "components/EnteLogo"; import { FilesDownloadProgress, FilesDownloadProgressAttributes, @@ -609,7 +609,7 @@ const EnteLinkLogo: React.FC = () => { }, })} > - + ); diff --git a/web/packages/base/components/EnteLogo.tsx b/web/packages/base/components/EnteLogo.tsx index 36236318ff..6c4f3e679b 100644 --- a/web/packages/base/components/EnteLogo.tsx +++ b/web/packages/base/components/EnteLogo.tsx @@ -33,3 +33,22 @@ const LogoImage = styled("img")` pointer-events: none; vertical-align: middle; `; + +/** + * The Ente logo ("ente" in Montserrat), as an inline svg. + * + * Having it as an inline SVG has two advantages: + * - It does not rely on a corresponding asset in the public folder + * - It can be styled using CSS (though right now it uses a hardcoded fill). + */ +export const EnteLogoSvg: React.FC = () => ( + + + +);