mirror of
https://github.com/standardnotes/mobile.git
synced 2026-04-19 05:39:20 -04:00
refactor: remove unnecessary useMemo hook
This commit is contained in:
@@ -341,16 +341,12 @@ export const BottomSheet: React.FC<Props> = ({
|
||||
};
|
||||
|
||||
const contentHeight = titleHeight + listHeight;
|
||||
const maxLimit = 0.85 * screenHeight;
|
||||
let snapPoints = [1];
|
||||
|
||||
const snapPoints = useMemo(() => {
|
||||
const screenHeight = Dimensions.get('window').height;
|
||||
const maxLimit = 0.85 * screenHeight;
|
||||
|
||||
if (contentHeight === 0) {
|
||||
return [1];
|
||||
}
|
||||
return contentHeight < maxLimit ? [contentHeight] : [maxLimit];
|
||||
}, [contentHeight]);
|
||||
if (contentHeight > 0) {
|
||||
snapPoints = contentHeight < maxLimit ? [contentHeight] : [maxLimit];
|
||||
}
|
||||
|
||||
const expandSection = (sectionKey: string) => {
|
||||
const animations: Animated.CompositeAnimation[] = [];
|
||||
|
||||
Reference in New Issue
Block a user