Skip to content

Commit 243720d

Browse files
committed
chore: Small test adjustment
1 parent e526f66 commit 243720d

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/app-layout/visual-refresh-toolbar/state/use-feature-notifications.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ export function useFeatureNotifications({ activeDrawersIds }: UseFeatureNotifica
134134
featurePromptRef.current?.show();
135135
}
136136
awsuiPlugins.appLayout.updateDrawer({ id: payload.id, badge: true });
137+
} else {
138+
setMarkAllAsRead(true);
137139
}
138140
});
139141
return;
@@ -166,22 +168,16 @@ export function useFeatureNotifications({ activeDrawersIds }: UseFeatureNotifica
166168

167169
function renderLatestFeaturePrompt({ triggerRef }: RenderLatestFeaturePromptProps) {
168170
const latestFeature = getLatestUnseenFeature();
169-
if (!(triggerRef && featureNotificationsData && latestFeature)) {
171+
if (!(triggerRef?.current && featureNotificationsData && latestFeature)) {
170172
return null;
171173
}
172174
return (
173175
<FeaturePrompt
174176
ref={featurePromptRef}
175177
onShow={() => {
176-
if (!triggerRef.current) {
177-
return;
178-
}
179178
triggerRef.current!.dataset!.awsuiSuppressTooltip = 'true';
180179
}}
181180
onDismiss={() => {
182-
if (!triggerRef.current) {
183-
return;
184-
}
185181
triggerRef.current!.dataset!.awsuiSuppressTooltip = 'false';
186182
setFeaturePromptDismissed(true);
187183
}}

0 commit comments

Comments
 (0)