Skip to content

Commit

Permalink
Apply mobile fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewGable committed Aug 10, 2020
1 parent a813cde commit 798135c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
5 changes: 3 additions & 2 deletions src/Expensify.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ Store.init();
class Expensify extends Component {
render() {
return (
<Beforeunload onBeforeunload={ActiveClientManager.removeClient}>
// TODO: Mobile does not support Beforeunload
// <Beforeunload onBeforeunload={ActiveClientManager.removeClient}>
<Router>
{/* If there is ever a property for redirecting, we do the redirect here */}
{this.state && this.state.redirectTo && <Redirect to={this.state.redirectTo} />}
Expand All @@ -30,7 +31,7 @@ class Expensify extends Component {
<Route path="/" component={HomePage} />
</Switch>
</Router>
</Beforeunload>
// </Beforeunload>
);
}
}
Expand Down
10 changes: 6 additions & 4 deletions src/page/HomePage/SidebarLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ class SidebarLink extends React.Component {
return (
<View style={linkWrapperActiveStyle}>
<Link to={`/${this.props.reportID}`} style={linkActiveStyle}>
<Text style={textActiveStyle}>{this.props.reportName}</Text>
{this.state.isUnread && (
<Text style={textActiveStyle}>- Unread</Text>
)}
<View>
<Text style={textActiveStyle}>{this.props.reportName}</Text>
{this.state.isUnread && (
<Text style={textActiveStyle}>- Unread</Text>
)}
</View>
</Link>
</View>
);
Expand Down
9 changes: 6 additions & 3 deletions src/style/StyleSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,18 @@ const styles = {
padding: 8,
},
sidebarLink: {
padding: '.5rem 1rem',
// TODO: Mobile does not support rem values
// padding: '.5rem 1rem',
textDecorationLine: 'none',
},
sidebarLinkActive: {
backgroundColor: '#007bff',
borderRadius: '.25rem',
// TODO: Mobile does not support rem values
// borderRadius: '.25rem',
},
sidebarLinkActiveAnchor: {
padding: '.5rem 1rem',
// TODO: Mobile does not support rem values
// padding: '.5rem 1rem',
textDecorationLine: 'none',
},
sidebarLinkText: {
Expand Down

0 comments on commit 798135c

Please sign in to comment.