]> Untitled Git - lemmy-ui.git/blob - src/client/components/About/About.tsx
Adding prettier
[lemmy-ui.git] / src / client / components / About / About.tsx
1 import { Component } from 'inferno';
2 import './About.css';
3 interface IState {
4   clickCount: number;
5 }
6 interface IProps {}
7 export default class About extends Component<IProps, IState> {
8   constructor(props) {
9     super(props);
10     this.state = {
11       clickCount: 0,
12     };
13     this.increment = this.increment.bind(this);
14   }
15   protected increment() {
16     this.setState({
17       clickCount: this.state.clickCount + 1,
18     });
19   }
20   public render() {
21     return (
22       <div>
23         Simple Inferno SSR template
24         <p className="text">Hello, world!</p>
25         <button onClick={this.increment} className="button">
26           Increment
27         </button>
28         <p className="count">{this.state.clickCount}</p>
29       </div>
30     );
31   }
32 }