-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
Copy pathAnonymousReportFooter.js
65 lines (57 loc) · 2.45 KB
/
AnonymousReportFooter.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import React from 'react';
import {View, Text} from 'react-native';
import PropTypes from 'prop-types';
import Button from './Button';
import AvatarWithDisplayName from './AvatarWithDisplayName';
import ExpensifyWordmark from './ExpensifyWordmark';
import withLocalize, {withLocalizePropTypes} from './withLocalize';
import reportPropTypes from '../pages/reportPropTypes';
import styles from '../styles/styles';
import * as Session from '../libs/actions/Session';
import participantPropTypes from './participantPropTypes';
const propTypes = {
/** The report currently being looked at */
report: reportPropTypes,
isSmallSizeLayout: PropTypes.bool,
/** Personal details of all the users */
personalDetails: PropTypes.objectOf(participantPropTypes),
...withLocalizePropTypes,
};
const defaultProps = {
report: {},
isSmallSizeLayout: false,
personalDetails: {},
};
function AnonymousReportFooter(props) {
return (
<View style={styles.anonymousRoomFooter(props.isSmallSizeLayout)}>
<View style={[styles.flexRow, styles.flexShrink1]}>
<AvatarWithDisplayName
report={props.report}
personalDetails={props.personalDetails}
isAnonymous
/>
</View>
<View style={styles.anonymousRoomFooterWordmarkAndLogoContainer(props.isSmallSizeLayout)}>
<View style={[props.isSmallSizeLayout ? styles.mr1 : styles.mr4, styles.flexShrink1]}>
<View style={[props.isSmallSizeLayout ? styles.alignItemsStart : styles.alignItemsEnd]}>
<ExpensifyWordmark style={styles.anonymousRoomFooterLogo} />
</View>
<Text style={styles.anonymousRoomFooterLogoTaglineText}>{props.translate('anonymousReportFooter.logoTagline')}</Text>
</View>
<View style={[styles.anonymousRoomFooterSignInButton]}>
<Button
medium
success
text={props.translate('common.signIn')}
onPress={() => Session.signOutAndRedirectToSignIn()}
/>
</View>
</View>
</View>
);
}
AnonymousReportFooter.propTypes = propTypes;
AnonymousReportFooter.defaultProps = defaultProps;
AnonymousReportFooter.displayName = 'AnonymousReportFooter';
export default withLocalize(AnonymousReportFooter);