Skip to content

feat: set icons for each type of notification #17115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 31, 2025
Prev Previous commit
Next Next commit
Fix missing type issues
  • Loading branch information
BrunoQuaresma committed Mar 28, 2025
commit fa1d788fb1f7590bb111138fb4d2bf606c8e1760
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const Markdown: Story = {
url: "https://dev.coder.com/workspaces?filter=template%3Acoder-with-ai",
},
],
icon: "DEFAULT_TEMPLATE_ICON",
icon: "DEFAULT_ICON_TEMPLATE",
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { FC } from "react";
import Markdown from "react-markdown";
import { Link as RouterLink } from "react-router-dom";
import { relativeTime } from "utils/time";
import { InboxAvatar, type InboxIcon } from "./InboxAvatar";
import { InboxAvatar } from "./InboxAvatar";

type InboxItemProps = {
notification: InboxNotification;
Expand All @@ -24,7 +24,7 @@ export const InboxItem: FC<InboxItemProps> = ({
tabIndex={-1}
>
<div className="flex-shrink-0">
<InboxAvatar icon={notification.icon as InboxIcon} />
<InboxAvatar icon={notification.icon} />
</div>

<div className="flex flex-col gap-3 flex-1">
Expand Down
2 changes: 1 addition & 1 deletion site/src/testHelpers/entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4261,7 +4261,7 @@ export const MockNotification: TypesGen.InboxNotification = {
template_id: MockTemplate.id,
targets: [],
title: "User account created",
icon: "DEFAULT_ACCOUNT_ICON",
icon: "DEFAULT_ICON_ACCOUNT",
};

export const MockNotifications: TypesGen.InboxNotification[] = [
Expand Down
Loading