Skip to content

Commit

Permalink
fix: changing orientation attachment picker issues (#2687)
Browse files Browse the repository at this point in the history
* fix: changing orientation attachment picker issues

* fix: linter issues
  • Loading branch information
isekovanic authored Sep 25, 2024
1 parent 5b25b0b commit b6dfbb9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions package/src/components/AttachmentPicker/AttachmentPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { BackHandler, Keyboard, Platform, StyleSheet } from 'react-native';

import BottomSheet, { BottomSheetFlatList } from '@gorhom/bottom-sheet';
Expand Down Expand Up @@ -256,15 +256,11 @@ export const AttachmentPicker = React.forwardRef(
* Snap points changing cause a rerender of the position,
* this is an issue if you are calling close on the bottom sheet.
*/
const snapPoints = useMemo(
() => [initialSnapPoint, finalSnapPoint],
[initialSnapPoint, finalSnapPoint],
);
const snapPoints = [initialSnapPoint, finalSnapPoint];

return (
<>
<BottomSheet
containerHeight={fullScreenHeight}
enablePanDownToClose={true}
handleComponent={
/**
Expand Down

0 comments on commit b6dfbb9

Please sign in to comment.