From dc3f4fe893346be0416c4ba30a8ecc4a7f8b890c Mon Sep 17 00:00:00 2001
From: Brian Kim <brian@tagg.id>
Date: Thu, 20 May 2021 17:26:00 -0700
Subject: Fix Linter

---
 src/screens/profile/CaptionScreen.tsx | 105 +++++++++++++++++-----------------
 1 file changed, 53 insertions(+), 52 deletions(-)

(limited to 'src/screens/profile/CaptionScreen.tsx')

diff --git a/src/screens/profile/CaptionScreen.tsx b/src/screens/profile/CaptionScreen.tsx
index 3d392361..ecb51531 100644
--- a/src/screens/profile/CaptionScreen.tsx
+++ b/src/screens/profile/CaptionScreen.tsx
@@ -1,6 +1,6 @@
 import {RouteProp} from '@react-navigation/native';
 import {StackNavigationProp} from '@react-navigation/stack';
-import React, {Fragment, useRef, useState, useEffect} from 'react';
+import React, {Fragment, useRef, useState} from 'react';
 import {
   Alert,
   Image,
@@ -8,7 +8,7 @@ import {
   KeyboardAvoidingView,
   Platform,
   StyleSheet,
-  Text,
+  // Text,
   TouchableWithoutFeedback,
   View,
 } from 'react-native';
@@ -17,9 +17,9 @@ import {Button} from 'react-native-elements';
 import {useDispatch, useSelector} from 'react-redux';
 import {SearchBackground} from '../../components';
 import {CaptionScreenHeader} from '../../components/';
-import Draggable from '../../components/common/Draggable';
+// import Draggable from '../../components/common/Draggable';
 import TaggLoadingIndicator from '../../components/common/TaggLoadingIndicator';
-import TaggDraggable from '../../components/taggs/TaggDraggable';
+// import TaggDraggable from '../../components/taggs/TaggDraggable';
 import {TAGG_LIGHT_BLUE_2} from '../../constants';
 import {ERROR_UPLOAD, SUCCESS_PIC_UPLOAD} from '../../constants/strings';
 import {MainStackParams} from '../../routes';
@@ -31,7 +31,7 @@ import {
 import {RootState} from '../../store/rootReducer';
 import {SCREEN_WIDTH, StatusBarHeight} from '../../utils';
 import {mentionPartTypes} from '../../utils/comments';
-import {TouchableOpacity} from 'react-native-gesture-handler';
+// import {TouchableOpacity} from 'react-native-gesture-handler';
 
 /**
  * Upload Screen to allow users to upload posts to Tagg
@@ -61,36 +61,37 @@ const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => {
   const [caption, setCaption] = useState('');
   const [loading, setLoading] = useState(false);
   // const [isTop, setIsTop] = useState(false);
-  const zIndex = [0, 999];
   const imageRef = useRef(null);
-  const [offset, setOffset] = useState([0, 0]);
-  const [curStart, setCurStart] = useState([0, 0]);
 
-  const [imageDimensions, setImageDimensions] = useState([0, 0]);
+  // const zIndex = [0, 999];
+  // const [offset, setOffset] = useState([0, 0]);
+  // const [curStart, setCurStart] = useState([0, 0]);
+  // const [imageDimensions, setImageDimensions] = useState([0, 0]);
+
   // created a state variable to keep track of every tag
   // idea is that each element in the list
-  const [taggList, setTaggList] = useState([
-    {
-      first_name: 'Ivan',
-      id: 'cee45bf8-7f3d-43c8-99bb-ec04908efe58',
-      last_name: 'Chen',
-      thumbnail_url:
-        'https://tagg-dev.s3.us-east-2.amazonaws.com/thumbnails/smallProfilePicture/spp-cee45bf8-7f3d-43c8-99bb-ec04908efe58-thumbnail.jpg',
-      username: 'ivan.tagg',
-    },
-    {
-      first_name: 'Ankit',
-      id: '3bcf6947-bee6-46b0-ad02-6f4d25eaeac3',
-      last_name: 'Thanekar',
-      thumbnail_url:
-        'https://tagg-dev.s3.us-east-2.amazonaws.com/thumbnails/smallProfilePicture/spp-3bcf6947-bee6-46b0-ad02-6f4d25eaeac3-thumbnail.jpg',
-      username: 'ankit.thanekar',
-    },
-  ]);
+  // const [taggList, setTaggList] = useState([
+  //   {
+  //     first_name: 'Ivan',
+  //     id: 'cee45bf8-7f3d-43c8-99bb-ec04908efe58',
+  //     last_name: 'Chen',
+  //     thumbnail_url:
+  //       'https://tagg-dev.s3.us-east-2.amazonaws.com/thumbnails/smallProfilePicture/spp-cee45bf8-7f3d-43c8-99bb-ec04908efe58-thumbnail.jpg',
+  //     username: 'ivan.tagg',
+  //   },
+  //   {
+  //     first_name: 'Ankit',
+  //     id: '3bcf6947-bee6-46b0-ad02-6f4d25eaeac3',
+  //     last_name: 'Thanekar',
+  //     thumbnail_url:
+  //       'https://tagg-dev.s3.us-east-2.amazonaws.com/thumbnails/smallProfilePicture/spp-3bcf6947-bee6-46b0-ad02-6f4d25eaeac3-thumbnail.jpg',
+  //     username: 'ankit.thanekar',
+  //   },
+  // ]);
   // state variables used to position draggables
 
   // state var used to keep track of draggable z ordering
-  const [layerOrder, setLayerOrder] = useState<string[]>([]);
+  // const [layerOrder, setLayerOrder] = useState<string[]>([]);
   // created a test user - BUG - failed to register a profile visit -
   // const testUser: UserType = {
   //   userId: 'ID-1234-567',
@@ -108,23 +109,23 @@ const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => {
    * Helper function that we use to keep track of which element should be on top most layer
    * @param index
    */
-  const bringToFront = (index: number) => {
-    let currUser = taggList[index].id;
-    if (layerOrder.includes(currUser)) {
-      layerOrder.splice(layerOrder.indexOf(currUser), 1);
-    }
-    layerOrder.push(currUser);
-    setLayerOrder(layerOrder);
-  };
+  // const bringToFront = (index: number) => {
+  //   let currUser = taggList[index].id;
+  //   if (layerOrder.includes(currUser)) {
+  //     layerOrder.splice(layerOrder.indexOf(currUser), 1);
+  //   }
+  //   layerOrder.push(currUser);
+  //   setLayerOrder(layerOrder);
+  // };
 
   /**
    * Helper function that tells us if the current draggable is the topmost one.
    * @param index
    */
-  const isOnTop = (index: number) => {
-    let currUser = taggList[index].id;
-    return currUser === layerOrder[0];
-  };
+  // const isOnTop = (index: number) => {
+  //   let currUser = taggList[index].id;
+  //   return currUser === layerOrder[0];
+  // };
   /**
    * function that sets the initial position of each newly created tag
    * @returns
@@ -135,18 +136,18 @@ const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => {
    * @returns
    */
 
-  useEffect(() => {
-    imageRef.current.measure((fx, fy, width, height, px, py) => {
-      console.log('Component width is: ' + width);
-      console.log('Component height is: ' + height);
-      console.log('X offset to frame: ' + fx);
-      console.log('Y offset to frame: ' + fy);
-      console.log('X offset to page: ' + px);
-      console.log('Y offset to page: ' + py);
-      setOffset([px, py]);
-      setImageDimensions([width, height]);
-    });
-  }, []);
+  // useEffect(() => {
+  //   imageRef.current.measure((fx, fy, width, height, px, py) => {
+  //     console.log('Component width is: ' + width);
+  //     console.log('Component height is: ' + height);
+  //     console.log('X offset to frame: ' + fx);
+  //     console.log('Y offset to frame: ' + fy);
+  //     console.log('X offset to page: ' + px);
+  //     console.log('Y offset to page: ' + py);
+  //     setOffset([px, py]);
+  //     setImageDimensions([width, height]);
+  //   });
+  // }, []);
 
   const handleShare = async () => {
     setLoading(true);
-- 
cgit v1.2.3-70-g09d2

