Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default ({ tabs: tabsProps }: TabsProps) => {
const ref = useRef();
const [tabs, setTabs] = useState([...tabsProps]);
const [selectedTab, setSelectedTab] = useState(OVERVIEW);
const transitionVal = useTransition(
selectedTab,
neq(selectedTab, OVERVIEW),
eq(selectedTab, OVERVIEW),
durationMs,
easing
);
const { onGestureEvent, translateY } = useMemo(() => {
const translationY = new Value(0);
const velocityY = new Value(0);
const state = new Value(State.UNDETERMINED);
const translateY1 = limit(
decay(translationY, state, velocityY),
state,
-tabsProps.length * 100,
0
);
export default ({ list }: ListProps) => {
const [open, setOpen] = useState(false);
const transition = useTransition(
open,
not(bin(open)),
bin(open),
400,
Easing.inOut(Easing.ease)
);
const height = bInterpolate(
transition,
0,
LIST_ITEM_HEIGHT * list.items.length
);
const bottomRadius = interpolate(transition, {
inputRange: [0, 16 / 400],
outputRange: [8, 0]
});
return (