mirror of
https://github.com/bulwarkmail/native.git
synced 2026-11-05 00:07:36 +00:00
refactor: optimize EmailRow component and improve row press handling in EmailListScreen
This commit is contained in:
@@ -32,7 +32,7 @@ interface MonthViewProps {
|
||||
onLongPressDate?: (date: Date) => void;
|
||||
}
|
||||
|
||||
export function MonthView({
|
||||
function MonthViewInner({
|
||||
currentDate,
|
||||
selectedDate,
|
||||
events,
|
||||
@@ -118,6 +118,8 @@ export function MonthView({
|
||||
);
|
||||
}
|
||||
|
||||
export const MonthView = React.memo(MonthViewInner);
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
grid: { paddingHorizontal: spacing.sm },
|
||||
weekdayRow: { flexDirection: 'row', paddingHorizontal: spacing.xs, marginBottom: 4 },
|
||||
|
||||
@@ -39,7 +39,7 @@ interface WeekViewProps {
|
||||
weekStartsOn?: 0 | 1;
|
||||
}
|
||||
|
||||
export function WeekView({
|
||||
function WeekViewInner({
|
||||
selectedDate,
|
||||
events,
|
||||
calendars,
|
||||
@@ -303,6 +303,8 @@ export function WeekView({
|
||||
);
|
||||
}
|
||||
|
||||
export const WeekView = React.memo(WeekViewInner);
|
||||
|
||||
function minutesToTimeLabel(minutes: number): string {
|
||||
const h = Math.floor(minutes / 60);
|
||||
const m = minutes % 60;
|
||||
|
||||
Reference in New Issue
Block a user