Skip to content

Commit

Permalink
feat: add Flex webinar notification banner (#20331)
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddhant-K-code authored Oct 30, 2024
1 parent 4a6ed64 commit 12277cc
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions components/dashboard/src/AppNotifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,12 @@ const GENERAL_NOTIFICATION = (
} as Notification;
};

const AWS_REINVENT_NOTIFICATION = (updateUser: (user: Partial<UserProtocol>) => Promise<User>) => {
/* const AWS_REINVENT_NOTIFICATION = (updateUser: (user: Partial<UserProtocol>) => Promise<User>) => {
return GENERAL_NOTIFICATION(
"aws_reinvent_2024",
<span className="text-md">
<b>See you at re:Invent!</b> Book a demo with us, and join our developer productivity leaders roundtable (limited tickets) |{" "}
<b>See you at re:Invent!</b> Book a demo with us, and join our developer productivity leaders roundtable
(limited tickets) |{" "}
<a
className="text-kumquat-ripe font-bold"
href="https://www.gitpod.io/aws-reinvent-24"
Expand All @@ -184,6 +185,25 @@ const AWS_REINVENT_NOTIFICATION = (updateUser: (user: Partial<UserProtocol>) =>
updateUser,
"aws_reinvent_notification",
);
}; */

const FLEX_WEBINAR_NOTIFICATION = (updateUser: (user: Partial<UserProtocol>) => Promise<User>) => {
return GENERAL_NOTIFICATION(
"flex_webinar_2024",
<span className="text-md">
<b>Upcoming webinar:</b> Gitpod Flex - Deploy your self-hosted CDE in 3 minutes |{" "}
<a
className="text-kumquat-ripe font-bold"
href="https://www.gitpod.io/webinars/gitpod-flex-demo"
target="_blank"
rel="noreferrer"
>
Register now
</a>
</span>,
updateUser,
"flex_webinar_notification",
);
};

export function AppNotifications() {
Expand Down Expand Up @@ -219,8 +239,12 @@ export function AppNotifications() {
notifications.push(GITPOD_FLEX_INTRODUCTION((u: Partial<UserProtocol>) => mutateAsync(u)));
}

if (isGitpodIo() && !user?.profile?.coachmarksDismissals["aws_reinvent_2024"]) {
notifications.push(AWS_REINVENT_NOTIFICATION((u: Partial<UserProtocol>) => mutateAsync(u)));
// if (isGitpodIo() && !user?.profile?.coachmarksDismissals["aws_reinvent_2024"]) {
// notifications.push(AWS_REINVENT_NOTIFICATION((u: Partial<UserProtocol>) => mutateAsync(u)));
// }

if (isGitpodIo() && !user?.profile?.coachmarksDismissals["flex_webinar_2024"]) {
notifications.push(FLEX_WEBINAR_NOTIFICATION((u: Partial<UserProtocol>) => mutateAsync(u)));
}
}

Expand Down

0 comments on commit 12277cc

Please sign in to comment.