Skip to content

Commit

Permalink
chore: remove duplicate log out button
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexogamer committed Oct 3, 2023
1 parent 9ee0331 commit 3aad95f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
8 changes: 0 additions & 8 deletions App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,6 @@ class MainView extends React.Component {
<LeftMenu
onChannelClick={this.setChannel.bind(this)}
currentChannel={this.state.currentChannel}
onLogOut={() => {
console.log(
`[AUTH] Logging out of current session... (user: ${client.user?._id})`,
);
AsyncStorage.setItem('token', '');
client.logout();
this.setState({status: 'awaitingLogin'});
}}
orderedServers={this.state.orderedServers}
/>
}
Expand Down
12 changes: 0 additions & 12 deletions src/SideMenus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ import AsyncStorage from '@react-native-async-storage/async-storage';
export const LeftMenu = ({
currentChannel,
onChannelClick,
onLogOut,
orderedServers,
}: {
currentChannel: any;
onChannelClick: Function;
onLogOut: Function;
orderedServers: string[];
}) => {
const [currentServer, setCurrentServerInner] = React.useState(
Expand Down Expand Up @@ -115,16 +113,6 @@ export const LeftMenu = ({
color={currentTheme.foregroundPrimary}
/>
</Button>
<Button
key={'bottom-nav-logout'}
onPress={onLogOut}
backgroundColor={currentTheme.background}>
<MaterialIcon
name="logout"
size={20}
color={currentTheme.foregroundPrimary}
/>
</Button>
</View>
</>
);
Expand Down

0 comments on commit 3aad95f

Please sign in to comment.