Skip to content

Commit 0e0c360

Browse files
committed
Only show privacy policy notice on Gitpod Cloud
1 parent 17f7b6c commit 0e0c360

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

components/dashboard/src/AppNotifications.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
* See License-AGPL.txt in the project root for license information.
55
*/
66

7+
import dayjs from "dayjs";
8+
import deepMerge from "deepmerge";
79
import { useCallback, useEffect, useState } from "react";
810
import Alert, { AlertType } from "./components/Alert";
9-
import dayjs from "dayjs";
1011
import { useUserLoader } from "./hooks/use-user-loader";
1112
import { getGitpodService } from "./service/service";
12-
import deepMerge from "deepmerge";
13+
import { isGitpodIo } from "./utils";
1314

1415
const KEY_APP_DISMISSED_NOTIFICATIONS = "gitpod-app-notifications-dismissed";
1516
const PRIVACY_POLICY_LAST_UPDATED = "2023-10-17";
@@ -48,10 +49,10 @@ export function AppNotifications() {
4849

4950
useEffect(() => {
5051
const notifications = [];
51-
if (!loading && user?.additionalData?.profile) {
52+
if (!loading && isGitpodIo()) {
5253
if (
53-
!user.additionalData.profile.acceptedPrivacyPolicyDate ||
54-
new Date(PRIVACY_POLICY_LAST_UPDATED) > new Date(user.additionalData.profile?.acceptedPrivacyPolicyDate)
54+
!user?.additionalData?.profile?.acceptedPrivacyPolicyDate ||
55+
new Date(PRIVACY_POLICY_LAST_UPDATED) > new Date(user.additionalData.profile.acceptedPrivacyPolicyDate)
5556
) {
5657
notifications.push(UPDATED_PRIVACY_POLICY);
5758
}

0 commit comments

Comments
 (0)