From 5409ac666e7ca389a3b48ed3f4c966aeb84a3ca5 Mon Sep 17 00:00:00 2001 From: ammarahm-ed Date: Wed, 11 Jan 2023 17:15:00 +0500 Subject: [PATCH] mobile: improve reminder time design --- .../app/components/list-items/note/index.js | 57 +++++-------- .../components/list-items/reminder/index.tsx | 47 ++++------- .../list-items/selection-wrapper/index.js | 2 +- .../mobile/app/components/properties/index.js | 36 ++------ .../sheets/reminder-notify/index.tsx | 2 +- .../app/components/sheets/reminder/index.tsx | 37 +++----- .../app/components/ui/reminder-time/index.tsx | 84 +++++++++++++++++++ .../app/screens/settings/settings-data.tsx | 2 +- apps/mobile/app/utils/constants.js | 2 +- 9 files changed, 142 insertions(+), 127 deletions(-) create mode 100644 apps/mobile/app/components/ui/reminder-time/index.tsx diff --git a/apps/mobile/app/components/list-items/note/index.js b/apps/mobile/app/components/list-items/note/index.js index 63020a532..fe49f45b0 100644 --- a/apps/mobile/app/components/list-items/note/index.js +++ b/apps/mobile/app/components/list-items/note/index.js @@ -37,6 +37,7 @@ import { SIZE } from "../../../utils/size"; import { Properties } from "../../properties"; import { Button } from "../../ui/button"; import { IconButton } from "../../ui/icon-button"; +import { ReminderTime } from "../../ui/reminder-time"; import { TimeSince } from "../../ui/time-since"; import Heading from "../../ui/typography/heading"; import Paragraph from "../../ui/typography/paragraph"; @@ -92,9 +93,9 @@ const NoteItem = ({ const attachmentCount = db.attachments?.ofNote(item.id, "all")?.length || 0; const notebooks = React.useMemo(() => getNotebook(item), [item]); const reminders = db.relations.from(item, "reminder"); - const current = getUpcomingReminder(reminders); + const reminder = getUpcomingReminder(reminders); const _update = useRelationStore((state) => state.updater); - + const noteColor = COLORS_NOTE[item.color?.toLowerCase()]; return ( <> {notebooks?.map((_item) => (