Skip to content

armgit / ente

Public Imported from GitHub
0

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

Hide referral banner on custom albums origin

Manav Rathif3cf1d07f115
diff --git a/web/apps/photos/src/pages/shared-albums.tsx b/web/apps/photos/src/pages/shared-albums.tsx
index 3adee0f904..2aa18e4253 100644
--- a/web/apps/photos/src/pages/shared-albums.tsx
+++ b/web/apps/photos/src/pages/shared-albums.tsx
@@ -50,6 +50,7 @@ import {
useIsTouchscreen,
} from "ente-base/components/utils/hooks";
import { useBaseContext } from "ente-base/context";
+import { isDevBuild } from "ente-base/env";
import {
isHTTP401Error,
isHTTPErrorWithStatus,
@@ -442,6 +443,8 @@ export default function PublicCollectionGallery() {
: undefined;
}, [publicCollection]);
+ const shouldShowReferralBanner = isDevBuild || !isCustomAlbumsAppOrigin;
+
const closeUploadTypeSelectorView = () => {
setUploadTypeSelectorView(false);
};
@@ -467,13 +470,16 @@ export default function PublicCollectionGallery() {
);
const fileListFooter = useMemo<FileListHeaderOrFooter>(() => {
- const props = { referralCode, onAddPhotos };
+ const props = {
+ referralCode: shouldShowReferralBanner ? referralCode : undefined,
+ onAddPhotos,
+ };
return {
component: <FileListFooter {...props} />,
height: fileListFooterHeightForProps(props),
extendToInlineEdges: true,
};
- }, [referralCode, onAddPhotos]);
+ }, [referralCode, onAddPhotos, shouldShowReferralBanner]);
if (loading && (!publicFiles || !credentials.current)) {
return <LoadingIndicator />;