Skip to content

Commit c4d3eb3

Browse files
Post AWS re:Invent cleanup (#20429)
1 parent b888cca commit c4d3eb3

File tree

1 file changed

+0
-60
lines changed

1 file changed

+0
-60
lines changed

components/dashboard/src/AppNotifications.tsx

-60
Original file line numberDiff line numberDiff line change
@@ -131,62 +131,6 @@ const INVALID_BILLING_ADDRESS = (stripePortalUrl: string | undefined) => {
131131
} as Notification;
132132
};
133133

134-
const GENERAL_NOTIFICATION = (
135-
id: string,
136-
message: JSX.Element,
137-
updateUser: (user: Partial<UserProtocol>) => Promise<User>,
138-
eventName: string = "general_notification",
139-
) => {
140-
return {
141-
id,
142-
type: "info",
143-
preventDismiss: true,
144-
onClose: async () => {
145-
let dismissSuccess = false;
146-
try {
147-
const updatedUser = await updateUser({
148-
additionalData: {
149-
profile: {
150-
coachmarksDismissals: {
151-
[id]: new Date().toISOString(),
152-
},
153-
},
154-
},
155-
});
156-
dismissSuccess = !!updatedUser;
157-
} catch (err) {
158-
dismissSuccess = false;
159-
} finally {
160-
trackEvent("coachmark_dismissed", {
161-
name: eventName,
162-
success: dismissSuccess,
163-
});
164-
}
165-
},
166-
message,
167-
} as Notification;
168-
};
169-
170-
const AWS_REINVENT_NOTIFICATION = (updateUser: (user: Partial<UserProtocol>) => Promise<User>) => {
171-
return GENERAL_NOTIFICATION(
172-
"aws_reinvent_2024",
173-
<span className="text-md">
174-
<b>See you at re:Invent!</b> Book a demo with us, and join our developer productivity leaders roundtable
175-
(limited tickets) |{" "}
176-
<a
177-
className="text-kumquat-ripe font-bold"
178-
href="https://www.gitpod.io/aws-reinvent-24"
179-
target="_blank"
180-
rel="noreferrer"
181-
>
182-
Learn more
183-
</a>
184-
</span>,
185-
updateUser,
186-
"aws_reinvent_notification",
187-
);
188-
};
189-
190134
export function AppNotifications() {
191135
const [topNotification, setTopNotification] = useState<Notification | undefined>(undefined);
192136
const { user, loading } = useUserLoader();
@@ -219,10 +163,6 @@ export function AppNotifications() {
219163
if (isGitpodIo() && !user?.profile?.coachmarksDismissals[GITPOD_FLEX_INTRODUCTION_COACHMARK_KEY]) {
220164
notifications.push(GITPOD_FLEX_INTRODUCTION((u: Partial<UserProtocol>) => mutateAsync(u)));
221165
}
222-
223-
if (isGitpodIo() && !user?.profile?.coachmarksDismissals["aws_reinvent_2024"]) {
224-
notifications.push(AWS_REINVENT_NOTIFICATION((u: Partial<UserProtocol>) => mutateAsync(u)));
225-
}
226166
}
227167

228168
if (!ignore) {

0 commit comments

Comments
 (0)