Skip to content
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

fix(client): react render logic #702

Merged
merged 2 commits into from
Dec 10, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
client: fix: react key cannot be passed and set via prop
  • Loading branch information
hmerritt committed Dec 9, 2023
commit 605fb7973b319b5627e7e2c5b67ed319acf168e9
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,14 @@ const NotificationTopToolbar: FC<NotificationTopToolbarProps> = ({
};

interface NotificationItemProps {
index: number;
notification: Notification;
}

const NotificationItem: FC<NotificationItemProps> = ({index, notification}: NotificationItemProps) => {
const NotificationItem: FC<NotificationItemProps> = ({notification}: NotificationItemProps) => {
const {i18n} = useLingui();

return (
<li className="notifications__list__item" key={index}>
<li className="notifications__list__item">
<div className="notification__heading">
<span className="notification__category">{i18n._(`${notification.id}.heading`)}</span>
{' — '}
Expand Down Expand Up @@ -195,7 +194,7 @@ const NotificationsButton: FC = observer(() => {
style={{minHeight: prevHeight}}
>
{notifications.map((notification, index) => (
<NotificationItem index={index} notification={notification} />
<NotificationItem key={index} notification={notification} />
))}
</ul>
<NotificationBottomToolbar
Expand Down
Loading