Untitled

mail@pastecode.io avatar
unknown
plain_text
22 days ago
490 B
2
Indexable
Never
goToday: () => {
      const translation =
        page > 0
          ? translateXLast.value + CARD_WIDTH * Math.abs(page)
          : translateXLast.value - CARD_WIDTH * Math.abs(page);

      runOnUI(() => {
        translateX.value = withTiming(translation, TIMING_CONFIG);
      })();
      translateXLast.value = withTiming(translation, TIMING_CONFIG);

      _setPage(0);
      setSelected(format(new Date(), "yyyy-MM-dd"));
      onDayPress?.(format(new Date(), "yyyy-MM-dd"));
    }
Leave a Comment