Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

mobile: remove today/tomorrow logic and set default expiry initial date to 1 week

kashaf-ansari-dev3db6c2b1fd06
diff --git a/apps/mobile/app/components/date-picker/index.tsx b/apps/mobile/app/components/date-picker/index.tsx
index 1f0f7ea87..49d170252 100644
--- a/apps/mobile/app/components/date-picker/index.tsx
+++ b/apps/mobile/app/components/date-picker/index.tsx
@@ -32,7 +32,7 @@ export default function DatePickerComponent(props: {
onCancel: () => void;
}) {
const { colors, isDark } = useThemeColors();
- const dateRef = useRef<Date>(dayjs().add(1, "day").toDate());
+ const dateRef = useRef<Date>(dayjs().add(1, "week").toDate());
const { width } = useWindowDimensions();
diff --git a/apps/mobile/app/components/ui/expiry-date/index.tsx b/apps/mobile/app/components/ui/expiry-date/index.tsx
index e5eba35fd..f19c99f0d 100644
--- a/apps/mobile/app/components/ui/expiry-date/index.tsx
+++ b/apps/mobile/app/components/ui/expiry-date/index.tsx
@@ -42,22 +42,10 @@ export const ExpiryDate = ({
short?: boolean;
} & ButtonProps) => {
const { colors } = useThemeColors();
-
const expiryValue = note?.expiryDate?.value;
if (!expiryValue) return null;
- const expiryDate = dayjs(expiryValue);
- const now = dayjs();
- const isToday = expiryDate.isSame(now, "day");
- const isTomorrow = expiryDate.isSame(now.add(1, "day"), "day");
-
- const formattedDate = isToday
- ? "Today"
- : isTomorrow
- ? "Tomorrow"
- : expiryDate.format("DD MMM YYYY");
-
- const isUrgent = isToday || isTomorrow;
+ const formattedDate = dayjs(expiryValue).format("DD MMM YYYY");
return (
<Button
@@ -66,9 +54,6 @@ export const ExpiryDate = ({
fontSize={textStyle?.fontSize || AppFontSize.xs}
iconSize={iconSize || AppFontSize.sm}
type="secondary"
- buttonType={
- isUrgent ? { text: color || colors.primary.accent } : undefined
- }
textStyle={{
marginRight: 0,
...textStyle