File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 4
4
* See License-AGPL.txt in the project root for license information.
5
5
*/
6
6
7
+ import dayjs from "dayjs" ;
8
+ import deepMerge from "deepmerge" ;
7
9
import { useCallback , useEffect , useState } from "react" ;
8
10
import Alert , { AlertType } from "./components/Alert" ;
9
- import dayjs from "dayjs" ;
10
11
import { useUserLoader } from "./hooks/use-user-loader" ;
11
12
import { getGitpodService } from "./service/service" ;
12
- import deepMerge from "deepmerge " ;
13
+ import { isGitpodIo } from "./utils " ;
13
14
14
15
const KEY_APP_DISMISSED_NOTIFICATIONS = "gitpod-app-notifications-dismissed" ;
15
16
const PRIVACY_POLICY_LAST_UPDATED = "2023-10-17" ;
@@ -48,10 +49,10 @@ export function AppNotifications() {
48
49
49
50
useEffect ( ( ) => {
50
51
const notifications = [ ] ;
51
- if ( ! loading && user ?. additionalData ?. profile ) {
52
+ if ( ! loading && isGitpodIo ( ) ) {
52
53
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 )
55
56
) {
56
57
notifications . push ( UPDATED_PRIVACY_POLICY ) ;
57
58
}
You can’t perform that action at this time.
0 commit comments