This repository has been archived on 2023-12-22. You can view files and clone it, but cannot push or open issues or pull requests.
old-monorepo/Dashboard/app/renderer/components/LoggedIn.js

24 lines
488 B
JavaScript

import React, { Component } from 'react';
import PropTypes from 'prop-types';
export default class LoggedIn extends Component {
static propTypes = {
onLogout: PropTypes.func.isRequired,
};
handleLogout = () => {
this.props.onLogout({
username: '',
loggedIn: false,
});
};
render() {
return (
<div>
<h2>Logged in as {this.props.user.username}</h2>
<button onClick={this.handleLogout}>Logout</button>
</div>
);
}
}