Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Cleanup and dedup

Manav Rathiba83c66ba65a
diff --git a/web/packages/base/components/Titlebar.tsx b/web/packages/base/components/Titlebar.tsx
index e16a058a56..295e75a7c7 100644
--- a/web/packages/base/components/Titlebar.tsx
+++ b/web/packages/base/components/Titlebar.tsx
@@ -36,12 +36,7 @@ export const Titlebar: React.FC<TitlebarProps> = ({
>
{backIsClose ? <CloseIcon /> : <ArrowBackIcon />}
</IconButton>
- <Box
- sx={{
- display: "flex",
- gap: "4px",
- }}
- >
+ <Box sx={{ display: "flex", gap: "4px" }}>
{actionButton && actionButton}
{!backIsClose && (
<IconButton onClick={onRootClose} color={"secondary"}>
@@ -50,18 +45,8 @@ export const Titlebar: React.FC<TitlebarProps> = ({
)}
</Box>
</FlexWrapper>
- <Box
- sx={{
- py: 0.5,
- px: 2,
- }}
- >
- <Typography
- variant="h3"
- sx={{
- fontWeight: "bold",
- }}
- >
+ <Box sx={{ py: 0.5, px: 2 }}>
+ <Typography variant="h3" sx={{ fontWeight: "bold" }}>
{title}
</Typography>
<Typography
diff --git a/web/packages/base/components/mui/ActivityIndicator.tsx b/web/packages/base/components/mui/ActivityIndicator.tsx
index 5bf351842b..bd9e7620c2 100644
--- a/web/packages/base/components/mui/ActivityIndicator.tsx
+++ b/web/packages/base/components/mui/ActivityIndicator.tsx
@@ -1,11 +1,9 @@
-import ErrorOutlineIcon from "@mui/icons-material/ErrorOutline";
import {
CircularProgress,
Stack,
Typography,
type CircularProgressProps,
} from "@mui/material";
-import { t } from "i18next";
import type React from "react";
/**
@@ -24,35 +22,8 @@ export const ActivityIndicator: React.FC<
children ? (
<Stack sx={{ gap: 2, alignItems: "center" }}>
<CircularProgress color="accent" size={24} {...rest} />
- <Typography
- sx={{
- color: "text.muted",
- }}
- >
- {children}
- </Typography>
+ <Typography sx={{ color: "text.muted" }}>{children}</Typography>
</Stack>
) : (
<CircularProgress color="accent" size={32} {...rest} />
);
-/**
- * An error message indicator, styled to complement {@link ActivityIndicator}.
- *
- * If a child is provided, it is used as the error message to show (after being
- * wrapped in a suitable {@link Typography}). Otherwise the default generic
- * error message is shown.
- */
-export const ErrorIndicator: React.FC<React.PropsWithChildren> = ({
- children,
-}) => (
- <Stack sx={{ gap: 2, alignItems: "center" }}>
- <ErrorOutlineIcon color="secondary" sx={{ color: "critical" }} />
- <Typography
- sx={{
- color: "text.muted",
- }}
- >
- {children ?? t("generic_error")}
- </Typography>
- </Stack>
-);
diff --git a/web/packages/base/components/mui/SidebarDrawer.tsx b/web/packages/base/components/mui/SidebarDrawer.tsx
index 4b2e34cd9f..54a9d44300 100644
--- a/web/packages/base/components/mui/SidebarDrawer.tsx
+++ b/web/packages/base/components/mui/SidebarDrawer.tsx
@@ -118,12 +118,7 @@ export const SidebarDrawerTitlebar: React.FC<SidebarDrawerTitlebarProps> = ({
<IconButton onClick={onClose} color={"primary"}>
<ArrowBackIcon />
</IconButton>
- <Box
- sx={{
- display: "flex",
- gap: "4px",
- }}
- >
+ <Box sx={{ display: "flex", gap: "4px" }}>
{actionButton && actionButton}
<IconButton onClick={onRootClose} color={"secondary"}>
<CloseIcon />
@@ -131,12 +126,7 @@ export const SidebarDrawerTitlebar: React.FC<SidebarDrawerTitlebarProps> = ({
</Box>
</SpaceBetweenFlex>
<Box sx={{ px: "16px", py: "4px" }}>
- <Typography
- variant="h3"
- sx={{
- fontWeight: "bold",
- }}
- >
+ <Typography variant="h3" sx={{ fontWeight: "bold" }}>
{title}
</Typography>
<Typography