Compare commits
3 commits
74f757ce66
...
faac5688f8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
faac5688f8 | ||
|
|
346b00defd | ||
|
|
11609f8277 |
7 changed files with 8 additions and 16 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ type PropsType = {
|
|||
onGroupPress: (data: PlanexGroupType) => void;
|
||||
onFavoritePress: (data: PlanexGroupType) => void;
|
||||
currentSearchString: string;
|
||||
height: number;
|
||||
theme: ReactNativePaper.Theme;
|
||||
};
|
||||
|
||||
|
|
@ -101,7 +100,6 @@ class GroupListAccordion extends React.Component<PropsType> {
|
|||
<AnimatedAccordion
|
||||
title={item.name.replace(REPLACE_REGEX, ' ')}
|
||||
style={{
|
||||
height: props.height,
|
||||
justifyContent: 'center',
|
||||
}}
|
||||
left={(iconProps) =>
|
||||
|
|
|
|||
|
|
@ -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,6 +61,7 @@ function EquipmentConfirmScreen(props: Props) {
|
|||
date: getRelativeDateString(start),
|
||||
});
|
||||
}
|
||||
console.log(buttonText);
|
||||
return (
|
||||
<CollapsibleScrollView>
|
||||
<Card style={{margin: 5}}>
|
||||
|
|
@ -84,12 +85,9 @@ function EquipmentConfirmScreen(props: Props) {
|
|||
</Caption>
|
||||
</View>
|
||||
</View>
|
||||
<Button
|
||||
icon="check-circle-outline"
|
||||
color={theme.colors.success}
|
||||
mode="text">
|
||||
<Title style={{color: theme.colors.success, textAlign: 'center'}}>
|
||||
{buttonText}
|
||||
</Button>
|
||||
</Title>
|
||||
<Paragraph style={{textAlign: 'center'}}>
|
||||
{i18n.t('screens.equipment.bookingConfirmedMessage')}
|
||||
</Paragraph>
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ 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;
|
||||
|
|
@ -127,7 +125,6 @@ class GroupSelectionScreen extends React.Component<PropsType, StateType> {
|
|||
onGroupPress={this.onListItemPress}
|
||||
onFavoritePress={this.onListFavoritePress}
|
||||
currentSearchString={currentSearchString}
|
||||
height={LIST_ITEM_HEIGHT}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
@ -311,7 +308,6 @@ class GroupSelectionScreen extends React.Component<PropsType, StateType> {
|
|||
fetchUrl={GROUPS_URL}
|
||||
renderItem={this.getRenderItem}
|
||||
updateData={state.currentSearchString + state.favoriteGroups.length}
|
||||
itemHeight={LIST_ITEM_HEIGHT}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue