Compare commits

..

No commits in common. "faac5688f8089c958e95187db50bf25e7d1051e4" and "74f757ce664eb241f2bed09eb44b4b04706e14bb" have entirely different histories.

7 changed files with 16 additions and 8 deletions

View file

@ -98,7 +98,7 @@ function EventDashBoardItem(props: PropsType) {
}
const areEqual = (prevProps: PropsType, nextProps: PropsType): boolean => {
return nextProps.eventNumber === prevProps.eventNumber;
return nextProps.eventNumber !== prevProps.eventNumber;
};
export default React.memo(EventDashBoardItem, areEqual);

View file

@ -88,7 +88,7 @@ function SmallDashboardItem(props: PropsType) {
}
const areEqual = (prevProps: PropsType, nextProps: PropsType): boolean => {
return nextProps.badgeCount === prevProps.badgeCount;
return nextProps.badgeCount !== prevProps.badgeCount;
};
export default React.memo(SmallDashboardItem, areEqual);

View file

@ -70,7 +70,7 @@ function DashboardEditItem(props: PropsType) {
}
const areEqual = (prevProps: PropsType, nextProps: PropsType): boolean => {
return nextProps.isActive === prevProps.isActive;
return nextProps.isActive !== prevProps.isActive;
};
export default React.memo(DashboardEditItem, areEqual);

View file

@ -130,7 +130,7 @@ function EquipmentListItem(props: PropsType) {
}
const areEqual = (prevProps: PropsType, nextProps: PropsType): boolean => {
return nextProps.userDeviceRentDates === prevProps.userDeviceRentDates;
return nextProps.userDeviceRentDates !== prevProps.userDeviceRentDates;
};
export default React.memo(EquipmentListItem, areEqual);

View file

@ -34,6 +34,7 @@ type PropsType = {
onGroupPress: (data: PlanexGroupType) => void;
onFavoritePress: (data: PlanexGroupType) => void;
currentSearchString: string;
height: number;
theme: ReactNativePaper.Theme;
};
@ -100,6 +101,7 @@ class GroupListAccordion extends React.Component<PropsType> {
<AnimatedAccordion
title={item.name.replace(REPLACE_REGEX, ' ')}
style={{
height: props.height,
justifyContent: 'center',
}}
left={(iconProps) =>

View file

@ -19,11 +19,11 @@
import * as React from 'react';
import {
Button,
Caption,
Card,
Headline,
Paragraph,
Title,
useTheme,
} from 'react-native-paper';
import {View} from 'react-native';
@ -61,7 +61,6 @@ function EquipmentConfirmScreen(props: Props) {
date: getRelativeDateString(start),
});
}
console.log(buttonText);
return (
<CollapsibleScrollView>
<Card style={{margin: 5}}>
@ -85,9 +84,12 @@ function EquipmentConfirmScreen(props: Props) {
</Caption>
</View>
</View>
<Title style={{color: theme.colors.success, textAlign: 'center'}}>
<Button
icon="check-circle-outline"
color={theme.colors.success}
mode="text">
{buttonText}
</Title>
</Button>
<Paragraph style={{textAlign: 'center'}}>
{i18n.t('screens.equipment.bookingConfirmedMessage')}
</Paragraph>

View file

@ -27,6 +27,8 @@ import WebSectionList from '../../components/Screens/WebSectionList';
import GroupListAccordion from '../../components/Lists/PlanexGroups/GroupListAccordion';
import AsyncStorageManager from '../../managers/AsyncStorageManager';
const LIST_ITEM_HEIGHT = 70;
export type PlanexGroupType = {
name: string;
id: number;
@ -125,6 +127,7 @@ class GroupSelectionScreen extends React.Component<PropsType, StateType> {
onGroupPress={this.onListItemPress}
onFavoritePress={this.onListFavoritePress}
currentSearchString={currentSearchString}
height={LIST_ITEM_HEIGHT}
/>
);
}
@ -308,6 +311,7 @@ class GroupSelectionScreen extends React.Component<PropsType, StateType> {
fetchUrl={GROUPS_URL}
renderItem={this.getRenderItem}
updateData={state.currentSearchString + state.favoriteGroups.length}
itemHeight={LIST_ITEM_HEIGHT}
/>
);
}