Skip to content

Commit 345506b

Browse files
simplesagarclaude
andcommitted
fix: resolve TypeScript errors in notification-bell and useRedeployDeployment
- Use Date type for notification createdAt/archivedAt (matches SDK) - Pass empty object instead of undefined to queryKeyNotificationsUnreadCount - Remove function wrapper around JSX in toast.success call Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent e01854a commit 345506b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

client/dashboard/src/components/notification-bell.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export function NotificationBell() {
6969
});
7070
queryClient.invalidateQueries({
7171
queryKey: queryKeyNotificationsUnreadCount(
72-
lastViewedAt ? { since: new Date(lastViewedAt) } : undefined,
72+
lastViewedAt ? { since: new Date(lastViewedAt) } : {},
7373
),
7474
});
7575
},
@@ -149,8 +149,8 @@ interface Notification {
149149
level: string;
150150
title: string;
151151
message?: string | null;
152-
createdAt: string;
153-
archivedAt?: string | null;
152+
createdAt: Date;
153+
archivedAt?: Date | null;
154154
}
155155

156156
interface NotificationListProps {
@@ -262,7 +262,7 @@ function NotificationItem({
262262
</Type>
263263
)}
264264
<Type small muted className="text-xs">
265-
{formatDistanceToNow(new Date(notification.createdAt), {
265+
{formatDistanceToNow(notification.createdAt, {
266266
addSuffix: true,
267267
})}
268268
</Type>

client/dashboard/src/pages/deployments/useRedeployDeployment.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const useRedeployDeployment = (
3838
const href = data.deployment?.id
3939
? routes.deployments.deployment.href(data.deployment.id)
4040
: undefined;
41-
toast.success(() => <RedeploySuccessToast href={href} />);
41+
toast.success(<RedeploySuccessToast href={href} />);
4242
options?.onSuccess?.(data, vars, onMutateResult, ctx);
4343
},
4444
onError: (err, vars, onMutateResult, ctx) => {

0 commit comments

Comments
 (0)