Skip to content

armgit / ente

Public Imported from GitHub
0

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

More tsc

Manav Rathi4c5d340b571f
diff --git a/web/apps/cast/src/pages/slideshow.tsx b/web/apps/cast/src/pages/slideshow.tsx
index 2bc1b32eff..4ecdb61e2a 100644
--- a/web/apps/cast/src/pages/slideshow.tsx
+++ b/web/apps/cast/src/pages/slideshow.tsx
@@ -9,7 +9,7 @@ import { imageURLGenerator } from "services/render";
const Page: React.FC = () => {
const [isEmpty, setIsEmpty] = useState(false);
- const [imageURL, setImageURL] = useState<string | undefined>();
+ const [imageURL, setImageURL] = useState("");
const router = useRouter();
diff --git a/web/apps/photos/src/components/Collections/CollectionShare.tsx b/web/apps/photos/src/components/Collections/CollectionShare.tsx
index fd17723720..e09fe29fb4 100644
--- a/web/apps/photos/src/components/Collections/CollectionShare.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionShare.tsx
@@ -1347,9 +1347,7 @@ const ManagePublicShareOptions: React.FC<ManagePublicShareOptionsProps> = ({
setBlockingLoad,
onRemotePull,
}) => {
- const [errorMessage, setErrorMessage] = useState<string | undefined>(
- undefined,
- );
+ const [errorMessage, setErrorMessage] = useState("");
const [copied, handleCopyLink] = useClipboardCopy(resolvedURL);
@@ -1362,7 +1360,7 @@ const ManagePublicShareOptions: React.FC<ManagePublicShareOptionsProps> = ({
updates: UpdatePublicURLAttributes,
) => {
setBlockingLoad(true);
- setErrorMessage(undefined);
+ setErrorMessage("");
try {
setPublicURL(await updatePublicURL(collection.id, updates));
void onRemotePull({ silent: true });
@@ -1375,7 +1373,7 @@ const ManagePublicShareOptions: React.FC<ManagePublicShareOptionsProps> = ({
};
const handleRemovePublicLink = async () => {
setBlockingLoad(true);
- setErrorMessage(undefined);
+ setErrorMessage("");
try {
await deleteShareURL(collection.id);
setPublicURL(undefined);
diff --git a/web/apps/photos/src/pages/shared-albums.tsx b/web/apps/photos/src/pages/shared-albums.tsx
index b3427da707..ac6ffd7759 100644
--- a/web/apps/photos/src/pages/shared-albums.tsx
+++ b/web/apps/photos/src/pages/shared-albums.tsx
@@ -98,7 +98,7 @@ export default function PublicCollectionGallery() {
const [publicFiles, setPublicFiles] = useState<EnteFile[] | undefined>(
undefined,
);
- const [errorMessage, setErrorMessage] = useState<string>(null);
+ const [errorMessage, setErrorMessage] = useState<string>("");
const [loading, setLoading] = useState(true);
const [isPasswordProtected, setIsPasswordProtected] = useState(false);
const [uploadTypeSelectorView, setUploadTypeSelectorView] = useState(false);
@@ -229,7 +229,7 @@ export default function PublicCollectionGallery() {
const isPasswordProtected =
!!collection.publicURLs[0]?.passwordEnabled;
setIsPasswordProtected(isPasswordProtected);
- setErrorMessage(null);
+ setErrorMessage("");
// Remove the locally cached accessTokenJWT if the sharer has
// disabled password protection on the link.