diff --git a/src/components.tsx b/src/components.tsx index 67c06b9..b7f7626 100644 --- a/src/components.tsx +++ b/src/components.tsx @@ -7,122 +7,113 @@ export type Inbox = { token: string; }; -export class Layout extends React.Component { - render() { - return ( - - - - - - - - - - - Kill the Newsletter! - - -
-

- Kill the Newsletter! -

-

Convert email newsletters into Atom feeds

-

- Convert email newsletters into Atom feeds -

-
-
{this.props.children}
- - - - ); - } +export function Layout({ children }: { children: React.ReactNode }) { + return ( + + + + + + + + + + + Kill the Newsletter! + + +
+

+ Kill the Newsletter! +

+

Convert email newsletters into Atom feeds

+

+ Convert email newsletters into Atom feeds +

+
+
{children}
+ + + + ); } -export class Form extends React.Component { - render() { - return ( -
-

- - -

-
- ); - } +export function Form() { + return ( +
+

+ + +

+
+ ); } -export class Created extends React.Component<{ inbox: Inbox }> { - render() { - const { name, token } = this.props.inbox; - return ( - <> -

“{name}” Inbox Created

-

- Sign up for the newsletter with -
- {token}@kill-the-newsletter.com -

-

- Subscribe to the Atom feed at -
- - https://www.kill-the-newsletter.com/feeds/{token} - .xml - -

-

- Don’t share these addresses. -
- They contain a security token that other people could use -
- to send you spam and to control your newsletter subscriptions. -

-

Enjoy your readings!

-

- - Create Another Inbox - -

- - ); - } +export function Created({ inbox: { name, token } }: { inbox: Inbox }) { + return ( + <> +

“{name}” Inbox Created

+

+ Sign up for the newsletter with +
+ {token}@kill-the-newsletter.com +

+

+ Subscribe to the Atom feed at +
+ + https://www.kill-the-newsletter.com/feeds/{token} + .xml + +

+

+ Don’t share these addresses. +
+ They contain a security token that other people could use +
+ to send you spam and to control your newsletter subscriptions. +

+

Enjoy your readings!

+

+ + Create Another Inbox + +

+ + ); } // https://validator.w3.org/feed/docs/atom.html