From 1512e1a20f4e8ad61333b4a40c03e1c449f7ba92 Mon Sep 17 00:00:00 2001 From: Ruidy Nemausat Date: Tue, 2 Jun 2020 20:26:35 +0200 Subject: [PATCH] refactor: Posts folder --- src/pages/Posts/Form.tsx | 22 ++++++++ src/pages/Posts/Item.tsx | 41 +++++++++++++++ src/pages/{Posts.tsx => Posts/index.tsx} | 64 ++++++------------------ 3 files changed, 79 insertions(+), 48 deletions(-) create mode 100644 src/pages/Posts/Form.tsx create mode 100644 src/pages/Posts/Item.tsx rename src/pages/{Posts.tsx => Posts/index.tsx} (51%) diff --git a/src/pages/Posts/Form.tsx b/src/pages/Posts/Form.tsx new file mode 100644 index 0000000..8b685bd --- /dev/null +++ b/src/pages/Posts/Form.tsx @@ -0,0 +1,22 @@ +import React, {FC} from 'react'; + +interface IProps { + text: string; + handleSubmit: (event: React.FormEvent) => void; + handleChange: (event: React.ChangeEvent) => void; +} + +const PostsForm: FC = ({text, handleSubmit, handleChange}) => ( +
+