From cb310ab1c1e4d2beb6f39b39e4972b9ae21f9849 Mon Sep 17 00:00:00 2001
From: Paul Frazee <pfrazee@gmail.com>
Date: Mon, 5 Sep 2022 14:16:48 -0500
Subject: Rewrite the post composer as a modal

---
 src/view/screens/Composer.tsx | 43 -------------------------------------------
 1 file changed, 43 deletions(-)
 delete mode 100644 src/view/screens/Composer.tsx

(limited to 'src/view/screens/Composer.tsx')

diff --git a/src/view/screens/Composer.tsx b/src/view/screens/Composer.tsx
deleted file mode 100644
index 2de84583f..000000000
--- a/src/view/screens/Composer.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-import React, {useLayoutEffect, useRef} from 'react'
-// import {Text, TouchableOpacity} from 'react-native'
-// import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
-import {Composer as ComposerComponent} from '../com/composer/Composer'
-import {ScreenParams} from '../routes'
-
-export const Composer = ({params}: ScreenParams) => {
-  const {replyTo} = params
-  const ref = useRef<{publish: () => Promise<boolean>}>()
-
-  // TODO
-  // useLayoutEffect(() => {
-  //   navigation.setOptions({
-  //     headerShown: true,
-  //     headerTitle: replyTo ? 'Reply' : 'New Post',
-  //     headerLeft: () => (
-  //       <TouchableOpacity onPress={() => navigation.goBack()}>
-  //         <FontAwesomeIcon icon="x" />
-  //       </TouchableOpacity>
-  //     ),
-  //     headerRight: () => (
-  //       <TouchableOpacity
-  //         onPress={() => {
-  //           if (!ref.current) {
-  //             return
-  //           }
-  //           ref.current.publish().then(
-  //             posted => {
-  //               if (posted) {
-  //                 navigation.goBack()
-  //               }
-  //             },
-  //             err => console.error('Failed to create post', err),
-  //           )
-  //         }}>
-  //         <Text>Post</Text>
-  //       </TouchableOpacity>
-  //     ),
-  //   })
-  // }, [navigation, replyTo, ref])
-
-  return <ComposerComponent ref={ref} replyTo={replyTo} />
-}
-- 
cgit 1.4.1

