diff --git a/src/app/features/room/message/RemindMeDialog.tsx b/src/app/features/room/message/RemindMeDialog.tsx index d38a7aa97..f86c143f8 100644 --- a/src/app/features/room/message/RemindMeDialog.tsx +++ b/src/app/features/room/message/RemindMeDialog.tsx @@ -2,16 +2,18 @@ import React, { useMemo } from 'react'; import FocusTrap from 'focus-trap-react'; import { Box, - Button, + color, + config, Header, Icon, IconButton, Icons, + Line, + MenuItem, Overlay, OverlayBackdrop, OverlayCenter, Text, - config, } from 'folds'; import { stopPropagation } from '../../../utils/keyboard'; import { useReminders } from '../../../hooks/useReminders'; @@ -27,13 +29,12 @@ function getPresets(): Array<{ label: string; ms: number }> { const tomorrow = new Date(); tomorrow.setDate(tomorrow.getDate() + 1); tomorrow.setHours(9, 0, 0, 0); - const tomorrowMs = tomorrow.getTime() - Date.now(); const timeLabel = tomorrow.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }); return [ { label: 'In 20 minutes', ms: 20 * 60_000 }, { label: 'In 1 hour', ms: 60 * 60_000 }, { label: 'In 3 hours', ms: 3 * 60 * 60_000 }, - { label: `Tomorrow at ${timeLabel}`, ms: tomorrowMs }, + { label: `Tomorrow at ${timeLabel}`, ms: tomorrow.getTime() - Date.now() }, ]; } @@ -58,60 +59,60 @@ export function RemindMeDialog({ roomId, eventId, previewText, onClose }: Remind -
+
- - Remind Me + + + Remind Me + - +
{previewText && ( - - - {previewText} - - + <> + + + {previewText} + + + + )} - + {presets.map((p) => ( - + handlePick(p.ms)}> + + {p.label} + + ))}