From 7009b08b83997152db97b3710d923029ed11a75a Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Fri, 25 Jun 2021 17:54:00 -0400 Subject: Cleanup dead code --- src/screens/profile/IndividualMoment.tsx | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'src/screens') diff --git a/src/screens/profile/IndividualMoment.tsx b/src/screens/profile/IndividualMoment.tsx index 7944c336..a322b1e9 100644 --- a/src/screens/profile/IndividualMoment.tsx +++ b/src/screens/profile/IndividualMoment.tsx @@ -4,19 +4,12 @@ import React, {useEffect, useRef, useState} from 'react'; import {FlatList, Keyboard, ViewToken} from 'react-native'; import {useSelector} from 'react-redux'; import {MomentPost, TabsGradient} from '../../components'; -import {AVATAR_DIM} from '../../constants'; import {MainStackParams} from '../../routes'; import {RootState} from '../../store/rootreducer'; import {MomentPostType} from '../../types'; -import {isIPhoneX} from '../../utils'; - -/** - * Individual moment view opened when user clicks on a moment tile - */ type MomentContextType = { keyboardVisible: boolean; - scrollTo: (index: number) => void; currentVisibleMomentId: string | undefined; }; @@ -73,20 +66,10 @@ const IndividualMoment: React.FC = ({route}) => { }; }, []); - const scrollTo = (index: number) => { - // TODO: make this dynamic - const offset = isIPhoneX() ? -(AVATAR_DIM + 100) : -(AVATAR_DIM + 160); - scrollRef.current?.scrollToIndex({ - index: index, - viewOffset: offset, - }); - }; - return (