This commit is contained in:
Leandro Facchinetti 2020-03-18 13:52:56 -04:00
parent 56936d209b
commit 9e6cc02ef6
1 changed files with 103 additions and 112 deletions

View File

@ -7,8 +7,7 @@ export type Inbox = {
token: string; token: string;
}; };
export class Layout extends React.Component { export function Layout({ children }: { children: React.ReactNode }) {
render() {
return ( return (
<html lang="en"> <html lang="en">
<head> <head>
@ -49,7 +48,7 @@ export class Layout extends React.Component {
/> />
</p> </p>
</header> </header>
<main>{this.props.children}</main> <main>{children}</main>
<footer> <footer>
<p> <p>
By <a href="https://www.leafac.com">Leandro Facchinetti</a> ·{" "} By <a href="https://www.leafac.com">Leandro Facchinetti</a> ·{" "}
@ -57,19 +56,15 @@ export class Layout extends React.Component {
Source Source
</a>{" "} </a>{" "}
·{" "} ·{" "}
<a href="mailto:kill-the-newsletter@leafac.com"> <a href="mailto:kill-the-newsletter@leafac.com">Report an Issue</a>
Report an Issue
</a>
</p> </p>
</footer> </footer>
</body> </body>
</html> </html>
); );
} }
}
export class Form extends React.Component { export function Form() {
render() {
return ( return (
<form method="POST" action="/"> <form method="POST" action="/">
<p> <p>
@ -86,11 +81,8 @@ export class Form extends React.Component {
</form> </form>
); );
} }
}
export class Created extends React.Component<{ inbox: Inbox }> { export function Created({ inbox: { name, token } }: { inbox: Inbox }) {
render() {
const { name, token } = this.props.inbox;
return ( return (
<> <>
<h1>{name} Inbox Created</h1> <h1>{name} Inbox Created</h1>
@ -123,7 +115,6 @@ export class Created extends React.Component<{ inbox: Inbox }> {
</> </>
); );
} }
}
// https://validator.w3.org/feed/docs/atom.html // https://validator.w3.org/feed/docs/atom.html